eal: allow combining -m and --no-huge

Needed to run as non-root but with higher memory allocations, and
removes a constraint on no-huge mode being limited to 64M. A usage
example is if running with file input with the pcap PMD, which can be
done as non-root after this patch via e.g.,

    ./test-dpdk --no-huge -m 1024 -l 0,1 -n3
		--vdev 'eth_pcap0,rx_pcap=eth-rx.pcap,tx_pcap=eth-tx.pcap'

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Johan Faltstrom <johan.faltstrom@netinsight.net>
Acked-by: David Marchand <david.marchand@6wind.com>
This commit is contained in:
Simon Kagstrom 2015-05-27 11:30:16 +02:00 committed by Thomas Monjalon
parent a8a9262de3
commit a7de7e6beb

View File

@ -850,9 +850,8 @@ eal_check_common_options(struct internal_config *internal_cfg)
"be specified at the same time\n");
return -1;
}
if (internal_cfg->no_hugetlbfs &&
(mem_parsed || internal_cfg->force_sockets == 1)) {
RTE_LOG(ERR, EAL, "Options -m or --"OPT_SOCKET_MEM" cannot "
if (internal_cfg->no_hugetlbfs && internal_cfg->force_sockets == 1) {
RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_MEM" cannot "
"be specified together with --"OPT_NO_HUGE"\n");
return -1;
}