This test looks bogus it is doing something that DPDK as a library really shouldn't allow:
/* use fork() to test rte_exit() */ static int test_exit_val(int exit_val) { int pid; int status; /* manually cleanup EAL memory, as the fork() below would otherwise * cause the same hugepages to be free()-ed multiple times. */ rte_service_finalize(); pid = fork(); if (pid == 0) rte_exit(exit_val, __func__); The problem is that rte_exit in the child process will end up calling rte_eal_cleanup(). But rte_eal_init was never called in the forked process it just inherits the state in the child; the service finalize comment hints at the problem. Why does it matter? Well if rte_eal_cleanup ends up trying to do the right thing and cleanup the worker threads it will fail because in the child process, those threads are not related (they are threads in the parent not the child). The question is does rte_exit() have to be allowed for the case where rte_eal_init() never succeeded in that process context? It looks like the eal_init() run_once flag should also be checked int eal_cleanup() to avoid doing cleanup if never initted? Alternatively, rte_exit() could never call eal_cleanup?