Message ID | 20150527113016.2c31ba7e@miho (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id B107C567E; Wed, 27 May 2015 11:30:26 +0200 (CEST) Received: from ernst.netinsight.se (ernst.netinsight.se [194.16.221.21]) by dpdk.org (Postfix) with SMTP id BADBA1288 for <dev@dpdk.org>; Wed, 27 May 2015 11:30:24 +0200 (CEST) Received: from miho (unverified [10.100.1.152]) by ernst.netinsight.se (EMWAC SMTPRS 0.83) with SMTP id <B0030023876@ernst.netinsight.se>; Wed, 27 May 2015 11:30:16 +0200 Date: Wed, 27 May 2015 11:30:16 +0200 From: Simon Kagstrom <simon.kagstrom@netinsight.net> To: dev@dpdk.org, david.marchand@6wind.com, john.mcnamara@intel.com Message-ID: <20150527113016.2c31ba7e@miho> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.27; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Simon Kagstrom
May 27, 2015, 9:30 a.m. UTC
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(-)
Comments
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; > } >
> -----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. --
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
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 >
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>
> > 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
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; }