env_dpdk: fix DPDK 18.05 legacy-mem check
In this case, we want to add --legacy-mem if it was not already specified. This means we need to check if strstr() returned NULL. Reported-by: Alok Kataria <alok.kataria@nutanix.com> Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ib99dd015ce6e3ee824e4b543a8379d7291e2671e Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478634 Reviewed-by: <alok.kataria@nutanix.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
232756e119
commit
58938d09bf
@ -343,7 +343,7 @@ spdk_build_eal_cmdline(const struct spdk_env_opts *opts)
|
||||
|
||||
#if RTE_VERSION >= RTE_VERSION_NUM(18, 05, 0, 0) && RTE_VERSION < RTE_VERSION_NUM(18, 5, 1, 0)
|
||||
/* Dynamic memory management is buggy in DPDK 18.05.0. Don't use it. */
|
||||
if (!opts->env_context || strstr(opts->env_context, "--legacy-mem") != NULL) {
|
||||
if (!opts->env_context || strstr(opts->env_context, "--legacy-mem") == NULL) {
|
||||
args = spdk_push_arg(args, &argcount, _sprintf_alloc("--legacy-mem"));
|
||||
if (args == NULL) {
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user