From 999b2ee0fe4511c44462b29566f264e8d9326e1b Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Fri, 24 Mar 2017 17:00:38 +0000 Subject: [PATCH] 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 --- 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 73da65a9a8..3f4d3a2478 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -521,6 +521,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 }, @@ -662,6 +663,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 ad70525c1e..3a573480dd 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -103,7 +103,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 8118206e78..df5a0ee06a 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.20.1