* [dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge
@ 2015-05-27 9:30 Simon Kagstrom
2015-05-27 13:06 ` Thomas F Herbert
2015-06-15 14:04 ` David Marchand
0 siblings, 2 replies; 7+ messages in thread
From: Simon Kagstrom @ 2015-05-27 9:30 UTC (permalink / raw)
To: dev, david.marchand, john.mcnamara
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=/tmp/eth-rx.pcap,tx_pcap=/tmp/eth-tx.pcap'
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Johan Faltstrom <johan.faltstrom@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;
}
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge
2015-05-27 9:30 [dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge Simon Kagstrom
@ 2015-05-27 13:06 ` Thomas F Herbert
2015-05-27 13:27 ` Mcnamara, John
2015-05-27 13:29 ` Simon Kagstrom
2015-06-15 14:04 ` David Marchand
1 sibling, 2 replies; 7+ messages in thread
From: Thomas F Herbert @ 2015-05-27 13:06 UTC (permalink / raw)
To: Simon Kagstrom, dev, david.marchand, john.mcnamara
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@netinsight.net>
> Signed-off-by: Johan Faltstrom <johan.faltstrom@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;
> }
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge
2015-05-27 13:06 ` Thomas F Herbert
@ 2015-05-27 13:27 ` Mcnamara, John
2015-05-27 13:29 ` Simon Kagstrom
1 sibling, 0 replies; 7+ messages in thread
From: Mcnamara, John @ 2015-05-27 13:27 UTC (permalink / raw)
To: Thomas F Herbert, Simon Kagstrom, dev, david.marchand
> -----Original Message-----
> From: Thomas F Herbert [mailto:therbert@redhat.com]
> Sent: Wednesday, May 27, 2015 2:07 PM
> To: Simon Kagstrom; dev@dpdk.org; david.marchand@6wind.com; Mcnamara, John
> Subject: Re: [dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge
>
>
>
> 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
Hi Thomas,
I just tried it with the HEAD via pwclient and it applies cleanly:
$ git pull origin
Already up-to-date.
$ pwclient git-am 4915
Applying patch #4915 using 'git am'
Description: [dpdk-dev,v2] eal: Allow combining -m and --no-huge
Applying: eal: Allow combining -m and --no-huge
John.
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge
2015-05-27 13:06 ` Thomas F Herbert
2015-05-27 13:27 ` Mcnamara, John
@ 2015-05-27 13:29 ` Simon Kagstrom
2015-05-27 14:17 ` Thomas F Herbert
1 sibling, 1 reply; 7+ messages in thread
From: Simon Kagstrom @ 2015-05-27 13:29 UTC (permalink / raw)
To: Thomas F Herbert; +Cc: dev
On Wed, 27 May 2015 09:06:46 -0400
Thomas F Herbert <therbert@redhat.com> wrote:
> 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
Hmm... I tried it myself, but just saved the email and used
git am main.mbox
and that worked.
I´m using claws-mail as a mailer.
// Simon
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge
2015-05-27 13:29 ` Simon Kagstrom
@ 2015-05-27 14:17 ` Thomas F Herbert
0 siblings, 0 replies; 7+ messages in thread
From: Thomas F Herbert @ 2015-05-27 14:17 UTC (permalink / raw)
To: Simon Kagstrom; +Cc: dev
On 5/27/15 9:29 AM, Simon Kagstrom wrote:
> On Wed, 27 May 2015 09:06:46 -0400
> Thomas F Herbert <therbert@redhat.com> wrote:
>> 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
>
> Hmm... I tried it myself, but just saved the email and used
>
> git am main.mbox
>
> and that worked.
Yes, the patch applies. Thanks!
>
>
> I´m using claws-mail as a mailer.
>
> // Simon
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge
2015-05-27 9:30 [dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge Simon Kagstrom
2015-05-27 13:06 ` Thomas F Herbert
@ 2015-06-15 14:04 ` David Marchand
2015-06-15 14:08 ` Thomas Monjalon
1 sibling, 1 reply; 7+ messages in thread
From: David Marchand @ 2015-06-15 14:04 UTC (permalink / raw)
To: Simon Kagstrom; +Cc: dev
On Wed, May 27, 2015 at 11:30 AM, Simon Kagstrom <
simon.kagstrom@netinsight.net> 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.,
>
> ./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@netinsight.net>
> Signed-off-by: Johan Faltstrom <johan.faltstrom@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;
> }
> --
> 1.9.1
>
Acked-by: David Marchand <david.marchand@6wind.com>
--
David Marchand
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge
2015-06-15 14:04 ` David Marchand
@ 2015-06-15 14:08 ` Thomas Monjalon
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2015-06-15 14:08 UTC (permalink / raw)
To: Simon Kagstrom; +Cc: dev, Johan Faltstrom
> > 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=/tmp/eth-rx.pcap,tx_pcap=/tmp/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>
Applied, thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-15 14:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-27 9:30 [dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge Simon Kagstrom
2015-05-27 13:06 ` Thomas F Herbert
2015-05-27 13:27 ` Mcnamara, John
2015-05-27 13:29 ` Simon Kagstrom
2015-05-27 14:17 ` Thomas F Herbert
2015-06-15 14:04 ` David Marchand
2015-06-15 14:08 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).