env/dpdk: allow 0 requested memory size

Now that DPDK can reserve additional memory on the fly,
the initial requested memory only serves as preallocation
and it makes sense to request no preallocated memory.

Right now, passing `--mem-size 0` counterintuitively
tries to reserve all hugepages on the system.

Change-Id: I281900efc7bd0bbb7eed30161ba0b88e16195170
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422241
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Dariusz Stojaczyk 2018-08-14 10:45:49 +02:00 committed by Jim Harris
parent ce643e0efe
commit 75327bc67e

View File

@ -246,7 +246,7 @@ spdk_build_eal_cmdline(const struct spdk_env_opts *opts)
}
/* set the memory size */
if (opts->mem_size > 0) {
if (opts->mem_size >= 0) {
args = spdk_push_arg(args, &argcount, _sprintf_alloc("-m %d", opts->mem_size));
if (args == NULL) {
return -1;