DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal_common_options: Allow combining -m and --no-huge
@ 2015-05-20 12:24 Simon Kagstrom
  2015-05-27  7:29 ` Mcnamara, John
  2015-05-27  7:43 ` David Marchand
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Kagstrom @ 2015-05-20 12:24 UTC (permalink / raw)
  To: dev

Needed to run as non-root but with higher memory allocations.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Johan Faltstrom <johan.faltstrom@netinsight.net>
---
 lib/librte_eal/common/eal_common_options.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 8fcb1ab..89b867d 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -851,8 +851,8 @@ eal_check_common_options(struct internal_config *internal_cfg)
 		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 "
+			(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] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] eal_common_options: Allow combining -m and --no-huge
  2015-05-20 12:24 [dpdk-dev] [PATCH] eal_common_options: Allow combining -m and --no-huge Simon Kagstrom
@ 2015-05-27  7:29 ` Mcnamara, John
  2015-05-27  7:43 ` David Marchand
  1 sibling, 0 replies; 4+ messages in thread
From: Mcnamara, John @ 2015-05-27  7:29 UTC (permalink / raw)
  To: Simon Kagstrom, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Simon Kagstrom
> Sent: Wednesday, May 20, 2015 1:24 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] eal_common_options: Allow combining -m and --
> no-huge
> 
> Needed to run as non-root but with higher memory allocations.
> 
> Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
> Signed-off-by: Johan Faltstrom <johan.faltstrom@netinsight.net>
> ---
>  lib/librte_eal/common/eal_common_options.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_eal/common/eal_common_options.c
> b/lib/librte_eal/common/eal_common_options.c
> index 8fcb1ab..89b867d 100644
> --- a/lib/librte_eal/common/eal_common_options.c
> +++ b/lib/librte_eal/common/eal_common_options.c
> @@ -851,8 +851,8 @@ eal_check_common_options(struct internal_config
> *internal_cfg)
>  		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 "
> +			(internal_cfg->force_sockets == 1)) {
> +		RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_MEM" cannot "
>  			"be specified together with --"OPT_NO_HUGE"\n");
>  		return -1;
>  	}


Hi,

Minor comments.

* Without mem_parsed the () aren't required and the conditional will fit on one line.

* The section prefix on the first/subject line should be "eal:" and the commit message/justification could be clearer. It would be worth doing a "git log" on the file and following the previous conventions for commit message on that component/file.

John

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] eal_common_options: Allow combining -m and --no-huge
  2015-05-20 12:24 [dpdk-dev] [PATCH] eal_common_options: Allow combining -m and --no-huge Simon Kagstrom
  2015-05-27  7:29 ` Mcnamara, John
@ 2015-05-27  7:43 ` David Marchand
  2015-05-27  8:09   ` Simon Kågström
  1 sibling, 1 reply; 4+ messages in thread
From: David Marchand @ 2015-05-27  7:43 UTC (permalink / raw)
  To: Simon Kagstrom; +Cc: dev

Hello Simon,

On Wed, May 20, 2015 at 2:24 PM, Simon Kagstrom <
simon.kagstrom@netinsight.net> wrote:

> Needed to run as non-root but with higher memory allocations.
>
> Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
> Signed-off-by: Johan Faltstrom <johan.faltstrom@netinsight.net>
> ---
>  lib/librte_eal/common/eal_common_options.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/librte_eal/common/eal_common_options.c
> b/lib/librte_eal/common/eal_common_options.c
> index 8fcb1ab..89b867d 100644
> --- a/lib/librte_eal/common/eal_common_options.c
> +++ b/lib/librte_eal/common/eal_common_options.c
> @@ -851,8 +851,8 @@ eal_check_common_options(struct internal_config
> *internal_cfg)
>                 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
> "
> +                       (internal_cfg->force_sockets == 1)) {
> +               RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_MEM" cannot "
>                         "be specified together with --"OPT_NO_HUGE"\n");
>                 return -1;
>         }
>

Hum, déjà vu.
Well, I asked some question last time :
http://dpdk.org/ml/archives/dev/2015-March/015867.html

This patch looks good but since I don't use this --no-huge that often, I
would like to know how you tested this.

And please, when resending a patch, it should be marked as vX.


-- 
David Marchand

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] eal_common_options: Allow combining -m and --no-huge
  2015-05-27  7:43 ` David Marchand
@ 2015-05-27  8:09   ` Simon Kågström
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Kågström @ 2015-05-27  8:09 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

Hi John and David!

On 2015-05-27 09:29, Mcnamara, John wrote:>
> Minor comments.
>
> * Without mem_parsed the () aren't required and the conditional will
fit on one line.
>
> * The section prefix on the first/subject line should be "eal:" and
the commit message/justification could be clearer. It would be worth
doing a "git log" on the file and following the previous conventions for
commit message on that component/file.

OK, I'll fix these issues.

On 2015-05-27 09:43, David Marchand wrote:
> Well, I asked some question last time :
> http://dpdk.org/ml/archives/dev/2015-March/015867.html
> 
> This patch looks good but since I don't use this --no-huge that often, I
> would like to know how you tested this.

I used the pcap PMD driver with file input, basically

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

this patch allows me to run this as myself (i.e., not root)

> And please, when resending a patch, it should be marked as vX.

Sorry about that, I stashed it and forgot about it for a while, and then
just re-made the commit. (Not only that: I lost the reply in the flood
of DPDK mails, so sort of what I was complaining about in the first place!)


Anyway, I'll update the patch and resend.

// Simon

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-27  8:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20 12:24 [dpdk-dev] [PATCH] eal_common_options: Allow combining -m and --no-huge Simon Kagstrom
2015-05-27  7:29 ` Mcnamara, John
2015-05-27  7:43 ` David Marchand
2015-05-27  8:09   ` Simon Kågström

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).