[dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge

Thomas F Herbert therbert at redhat.com
Wed May 27 15:06:46 CEST 2015



On 5/27/15 5:30 AM, Simon Kagstrom wrote:
> 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.,
Simon,

I just tried applying v2 of the patch to master:
git apply ../patches/eal_common_options.patch
error: patch failed: lib/librte_eal/common/eal_common_options.c:850
error: lib/librte_eal/common/eal_common_options.c: patch does not apply

>
>      ./test-dpdk --no-huge -m 1024 -l 0,1 -n3 --vdev 'eth_pcap0,rx_pcap=/tmp/eth-rx.pcap,tx_pcap=/tmp/eth-tx.pcap'
>
> Signed-off-by: Simon Kagstrom <simon.kagstrom at netinsight.net>
> Signed-off-by: Johan Faltstrom <johan.faltstrom at netinsight.net>
> ---
> v2:
>     * Remove unneeded parentheses and merge lines
>
>     * Patch prefix now eal:
>
>     * Add example and more description (from David Marchand)
>
>   lib/librte_eal/common/eal_common_options.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
> index 8fcb1ab..1f459ac 100644
> --- a/lib/librte_eal/common/eal_common_options.c
> +++ b/lib/librte_eal/common/eal_common_options.c
> @@ -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;
>   	}
>


More information about the dev mailing list