From: Bruce Richardson <bruce.richardson@intel.com>
To: jingjing.wu@intel.com
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [PATCH] app/testpmd: enable NUMA support by default
Date: Fri, 24 Mar 2017 17:00:38 +0000 [thread overview]
Message-ID: <20170324170038.20362-1-bruce.richardson@intel.com> (raw)
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>
---
app/test-pmd/parameters.c | 3 +++
app/test-pmd/testpmd.c | 2 +-
doc/guides/testpmd_app_ug/run_app.rst | 7 ++++++-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 28db8cd..71e218e 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -515,6 +515,7 @@ launch_args_parse(int argc, char** argv)
{ "coremask", 1, 0, 0 },
{ "portmask", 1, 0, 0 },
{ "numa", 0, 0, 0 },
+ { "no-numa", 0, 0, 0 },
{ "mp-anon", 0, 0, 0 },
{ "port-numa-config", 1, 0, 0 },
{ "ring-numa-config", 1, 0, 0 },
@@ -651,6 +652,8 @@ launch_args_parse(int argc, char** argv)
parse_fwd_coremask(optarg);
if (!strcmp(lgopts[opt_idx].name, "portmask"))
parse_fwd_portmask(optarg);
+ if (!strcmp(lgopts[opt_idx].name, "no-numa"))
+ numa_support = 0;
if (!strcmp(lgopts[opt_idx].name, "numa")) {
numa_support = 1;
memset(port_numa,NUMA_NO_CONFIG,RTE_MAX_ETHPORTS);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index e89a55a..509793b 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -95,7 +95,7 @@ uint8_t auto_start = 0;
* probed ports among the CPU sockets 0 and 1.
* Otherwise, all memory is allocated from CPU socket 0.
*/
-uint8_t numa_support = 0; /**< No numa support by default */
+uint8_t numa_support = 1; /**< numa enabled by default */
/*
* In UMA mode,all memory is allocated from socket 0 if --socket-num is
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index d1fabef..d022d22 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -211,7 +211,12 @@ The commandline options are:
* ``--numa``
- Enable NUMA-aware allocation of RX/TX rings and of RX memory buffers (mbufs).
+ Enable NUMA-aware allocation of RX/TX rings and of RX memory buffers
+ (mbufs). [Default setting]
+
+* ``--no-numa``
+
+ Disable NUMA-aware allocation of RX/TX rings and of RX memory buffers (mbufs).
* ``--port-numa-config=(port,socket)[,(port,socket)]``
--
2.9.3
next reply other threads:[~2017-03-24 17:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 17:00 Bruce Richardson [this message]
2017-04-19 16:19 ` Thomas Monjalon
2017-04-20 23:21 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170324170038.20362-1-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).