DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: initalize port_numa and ring_numa
@ 2017-04-26  4:31 Yulong Pei
  0 siblings, 0 replies; 3+ messages in thread
From: Yulong Pei @ 2017-04-26  4:31 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, jingjing.wu, thomas

Previous numa_support = 0 by default, it need to add --numa to testpmd
command line to enable numa, so port_numa and ring_numa were initalized
at function launch_args_parse(), now testpmd change numa_support = 1 as
default, so port_numa and ring_numa also need to initalize by default,
otherwise port->socket_id will be probed to wrong value.

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
---
 app/test-pmd/parameters.c | 6 +-----
 app/test-pmd/testpmd.c    | 6 ++++++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 3f4d3a2..3296b3a 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -665,12 +665,8 @@ launch_args_parse(int argc, char** argv)
 				parse_fwd_portmask(optarg);
 			if (!strcmp(lgopts[opt_idx].name, "no-numa"))
 				numa_support = 0;
-			if (!strcmp(lgopts[opt_idx].name, "numa")) {
+			if (!strcmp(lgopts[opt_idx].name, "numa"))
 				numa_support = 1;
-				memset(port_numa,NUMA_NO_CONFIG,RTE_MAX_ETHPORTS);
-				memset(rxring_numa,NUMA_NO_CONFIG,RTE_MAX_ETHPORTS);
-				memset(txring_numa,NUMA_NO_CONFIG,RTE_MAX_ETHPORTS);
-			}
 			if (!strcmp(lgopts[opt_idx].name, "mp-anon")) {
 				mp_anon = 1;
 			}
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 3a57348..d52315a 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -543,6 +543,12 @@ init_config(void)
 		fwd_lcores[lc_id]->cpuid_idx = lc_id;
 	}
 
+	if (numa_support) {
+		memset(port_numa,NUMA_NO_CONFIG,RTE_MAX_ETHPORTS);
+		memset(rxring_numa,NUMA_NO_CONFIG,RTE_MAX_ETHPORTS);
+		memset(txring_numa,NUMA_NO_CONFIG,RTE_MAX_ETHPORTS);
+	}
+
 	/*
 	 * Create pools of mbuf.
 	 * If NUMA support is disabled, create a single pool of mbuf in
-- 
2.1.0

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

* Re: [dpdk-dev] [PATCH] app/testpmd: initalize port_numa and ring_numa
  2017-04-28  7:36 ` Wu, Jingjing
@ 2017-04-28  8:11   ` Pei, Yulong
  0 siblings, 0 replies; 3+ messages in thread
From: Pei, Yulong @ 2017-04-28  8:11 UTC (permalink / raw)
  To: Wu, Jingjing, dev; +Cc: Richardson, Bruce, thomas

Hi Jingjing,

Thanks for the review, already sent v4 patch and fixes line in it.

Best Regards
Yulong Pei

-----Original Message-----
From: Wu, Jingjing 
Sent: Friday, April 28, 2017 3:36 PM
To: Pei, Yulong <yulong.pei@intel.com>; dev@dpdk.org
Cc: Richardson, Bruce <bruce.richardson@intel.com>; thomas@monjalon.net
Subject: RE: [PATCH] app/testpmd: initalize port_numa and ring_numa



> -----Original Message-----
> From: Pei, Yulong
> Sent: Monday, April 24, 2017 3:16 PM
> To: dev@dpdk.org
> Cc: Richardson, Bruce <bruce.richardson@intel.com>; Wu, Jingjing 
> <jingjing.wu@intel.com>; thomas@monjalon.net; Pei, Yulong 
> <yulong.pei@intel.com>
> Subject: [PATCH] app/testpmd: initalize port_numa and ring_numa
> 
> Previous numa_support = 0 by default, it need to add --numa to testpmd 
> command line to enable numa, so port_numa and ring_numa were 
> initalized at function launch_args_parse(), now testpmd change 
> numa_support = 1 as default, so port_numa and ring_numa also need to 
> initalize by default, otherwise port->socket_id will be probed to wrong value.
> 
> Signed-off-by: Yulong Pei <yulong.pei@intel.com>


Thanks!

Patch is fine. Could you add Fixes line for this patch?
I think should be this commit?

commit 999b2ee0fe4511c44462b29566f264e8d9326e1b
Author: Bruce Richardson <bruce.richardson@intel.com>
Date:   Fri Mar 24 17:00:38 2017 +0000

    app/testpmd: enable NUMA support by default

    There is little reason for NUMA support in testpmd to be off by default, so
    enable it, and add in a new commandline parameter to disable it, if that is
    wanted by users.

    Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

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

* Re: [dpdk-dev] [PATCH] app/testpmd: initalize port_numa and ring_numa
       [not found] <1493018159-6882-1-git-send-email-yulong.pei@intel.com>
@ 2017-04-28  7:36 ` Wu, Jingjing
  2017-04-28  8:11   ` Pei, Yulong
  0 siblings, 1 reply; 3+ messages in thread
From: Wu, Jingjing @ 2017-04-28  7:36 UTC (permalink / raw)
  To: Pei, Yulong, dev; +Cc: Richardson, Bruce, thomas



> -----Original Message-----
> From: Pei, Yulong
> Sent: Monday, April 24, 2017 3:16 PM
> To: dev@dpdk.org
> Cc: Richardson, Bruce <bruce.richardson@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; thomas@monjalon.net; Pei, Yulong
> <yulong.pei@intel.com>
> Subject: [PATCH] app/testpmd: initalize port_numa and ring_numa
> 
> Previous numa_support = 0 by default, it need to add --numa to testpmd
> command line to enable numa, so port_numa and ring_numa were initalized at
> function launch_args_parse(), now testpmd change numa_support = 1 as
> default, so port_numa and ring_numa also need to initalize by default,
> otherwise port->socket_id will be probed to wrong value.
> 
> Signed-off-by: Yulong Pei <yulong.pei@intel.com>


Thanks!

Patch is fine. Could you add Fixes line for this patch?
I think should be this commit?

commit 999b2ee0fe4511c44462b29566f264e8d9326e1b
Author: Bruce Richardson <bruce.richardson@intel.com>
Date:   Fri Mar 24 17:00:38 2017 +0000

    app/testpmd: enable NUMA support by default

    There is little reason for NUMA support in testpmd to be off by default, so
    enable it, and add in a new commandline parameter to disable it, if that is
    wanted by users.

    Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

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

end of thread, other threads:[~2017-04-28  8:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26  4:31 [dpdk-dev] [PATCH] app/testpmd: initalize port_numa and ring_numa Yulong Pei
     [not found] <1493018159-6882-1-git-send-email-yulong.pei@intel.com>
2017-04-28  7:36 ` Wu, Jingjing
2017-04-28  8:11   ` Pei, Yulong

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