app/testpmd: disable memory locking on FreeBSD

If mlockall() is called while allocated VA space is bigger than
amount of available RAM, FreeBSD kernel will deadlock and need
a hard reboot. We do allocate big amounts of memory because of
how new memory subsystem works, so calling mlockall() will cause
a deadlock. So, disable mlockall() by default on FreeBSD.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This commit is contained in:
Anatoly Burakov 2018-05-03 13:38:20 +01:00 committed by Thomas Monjalon
parent e505d84c64
commit fb7b8b32cd

View File

@ -2615,6 +2615,13 @@ main(int argc, char** argv)
latencystats_enabled = 0;
#endif
/* on FreeBSD, mlockall() is disabled by default */
#ifdef RTE_EXEC_ENV_BSDAPP
do_mlockall = 0;
#else
do_mlockall = 1;
#endif
argc -= diag;
argv += diag;
if (argc > 1)