From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id CFA4BD332 for ; Fri, 24 Mar 2017 18:00:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490374842; x=1521910842; h=from:to:cc:subject:date:message-id; bh=Tvx8SmB1717MBWDyAA2fLLgAuX0I1LSm4zZzcPTBcEY=; b=A1uN9tRWNbYC2x3tCzW8p1zqJ/SQaHZDcWC2Smwf9tTlZKYwo9N4AMEa lZGR/u9AyGYXoUpl3wUuRDMSgVJsFg==; Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Mar 2017 10:00:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,215,1486454400"; d="scan'208";a="947879058" Received: from sivswdev01.ir.intel.com ([10.237.217.45]) by orsmga003.jf.intel.com with ESMTP; 24 Mar 2017 10:00:40 -0700 From: Bruce Richardson To: jingjing.wu@intel.com Cc: dev@dpdk.org, Bruce Richardson Date: Fri, 24 Mar 2017 17:00:38 +0000 Message-Id: <20170324170038.20362-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.8.4 Subject: [dpdk-dev] [PATCH] app/testpmd: enable NUMA support by default X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Mar 2017 17:00:43 -0000 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 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