From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 1282CC568 for ; Tue, 23 Jun 2015 03:45:48 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 22 Jun 2015 18:45:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,663,1427785200"; d="scan'208";a="751438019" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by orsmga002.jf.intel.com with ESMTP; 22 Jun 2015 18:45:46 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by KMSMSX151.gar.corp.intel.com (172.21.73.86) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 23 Jun 2015 09:45:45 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.165]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.168]) with mapi id 14.03.0224.002; Tue, 23 Jun 2015 09:45:43 +0800 From: "Liang, Cunming" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v1] app/test: fix pmd_perf issue in no NUMA case Thread-Index: AQHQobUFem00m5bf2UWRA91AVZIWN524k7kAgADPqWA= Date: Tue, 23 Jun 2015 01:45:43 +0000 Message-ID: References: <1433745194-27771-1-git-send-email-cunming.liang@intel.com> <3079471.cQLiANhq3b@xps13> In-Reply-To: <3079471.cQLiANhq3b@xps13> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v1] app/test: fix pmd_perf issue in no NUMA case X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2015 01:45:49 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Tuesday, June 23, 2015 5:02 AM > To: Liang, Cunming > Cc: dev@dpdk.org; Jayakumar, Muthurajan > Subject: Re: [dpdk-dev] [PATCH v1] app/test: fix pmd_perf issue in no NUM= A case >=20 > 2015-06-08 14:33, Cunming Liang: > > Reported-by: Jayakumar, Muthurajan > > Signed-off-by: Cunming Liang >=20 > Please explain exactly what you try to fix. > Is it still needed since this patch? > http://dpdk.org/browse/dpdk/commit/?id=3D94ef2964148a4540 >=20 > > + socket_id =3D rte_eth_dev_socket_id(port_id); > > + if (socket_id < 0) > > + /* enforce using socket 0 when no NUMA support */ > > + socket_id =3D 0; The referred patch 94ef29 fixes eal_cpu_socket_id() for the socket id of a = logical core. It's not for the case here which trying to get socket id of a port. The original purpose of the patch is to allow the unit test works even with= out NUMA support. Now I have a look on the function definition, when socket could not be dete= rmined, the default shall be zero instead of -1. So I think the below change should be made in eal_pci.c /* * Return the NUMA socket to which an Ethernet device is connected * @return * The NUMA socket id to which the Ethernet device is connected or * a default of zero if the socket could not be determined. * -1 is returned is the port_id value is out of range. */ extern int rte_eth_dev_socket_id(uint8_t port_id); diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxap= p/eal/eal_pci.c index d2adc66..8f9f136 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -317,8 +317,8 @@ pci_scan_one(const char *dirname, uint16_t domain, uint= 8_t bus, snprintf(filename, sizeof(filename), "%s/numa_node", dirname); if (access(filename, R_OK) !=3D 0) { - /* if no NUMA support just set node to -1 */ - dev->numa_node =3D -1; + /* if no NUMA support just set node to 0 */ + dev->numa_node =3D 0; } else { if (eal_parse_sysfs_value(filename, &tmp) < 0) { free(dev); /Steve