From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 239C71E34; Mon, 8 May 2017 02:54:22 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP; 07 May 2017 17:54:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,306,1491289200"; d="scan'208";a="258122745" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 07 May 2017 17:54:21 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 7 May 2017 17:54:21 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 7 May 2017 17:54:21 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.117]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.217]) with mapi id 14.03.0319.002; Mon, 8 May 2017 08:54:19 +0800 From: "Wu, Jingjing" To: Shahaf Shuler CC: "dev@dpdk.org" , Thomas Monjalon , "stable@dpdk.org" Thread-Topic: [PATCH v2] app/testpmd: support non contiguous socket ids Thread-Index: AQHSxBNt8Bgnb7B1MEyktyKgEDyQkKHmhiGggAFbn4CAAcDRUA== Date: Mon, 8 May 2017 00:54:18 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810D6383D@SHSMSX103.ccr.corp.intel.com> References: <20170503134429.22723-1-shahafs@mellanox.com> <9BB6961774997848B5B42BEC655768F810D624B2@SHSMSX103.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH v2] app/testpmd: support non contiguous socket ids X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 00:54:23 -0000 > -----Original Message----- > From: Shahaf Shuler [mailto:shahafs@mellanox.com] > Sent: Sunday, May 7, 2017 2:06 PM > To: Wu, Jingjing > Cc: dev@dpdk.org; Thomas Monjalon ; > stable@dpdk.org > Subject: RE: [PATCH v2] app/testpmd: support non contiguous socket ids >=20 > Saturday, May 6, 2017 4:41 AM, Wu, Jingjing: > > > > > > The test assumes the socket ids are contiguous. This is not > > > necessarily the case on all servers and may cause mempool creation to= fail. > > > > > > Fixing it by detecting the list of valid socket ids and use it for > > > the mempool creation. > > > > > > Fixes: 7acf894d07d1 ("app/testpmd: detect numa socket count") > > > > > > CC: stable@dpdk.org > > > Signed-off-by: Shahaf Shuler > > > --- > > > on v2: > > > * fix minor typo on commit message : be->by. > > > --- > > > app/test-pmd/parameters.c | 38 ++++++++++++++++++++++++++++----- > > ----- > > > app/test-pmd/testpmd.c | 38 +++++++++++++++++++++++++++++------ > > --- > > > app/test-pmd/testpmd.h | 4 +++- > > > 3 files changed, 60 insertions(+), 20 deletions(-) > > > >=20 > [..] >=20 > > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > > > dfe64427d..a556a8aff 100644 > > > --- a/app/test-pmd/testpmd.c > > > +++ b/app/test-pmd/testpmd.c >=20 > [..] >=20 > > > +/* > > > * Setup default configuration. > > > */ > > > static void > > > @@ -388,12 +405,14 @@ set_default_fwd_lcores_config(void) > > > > > > nb_lc =3D 0; > > > for (i =3D 0; i < RTE_MAX_LCORE; i++) { > > > - sock_num =3D rte_lcore_to_socket_id(i) + 1; > > > - if (sock_num > max_socket) { > > > - if (sock_num > RTE_MAX_NUMA_NODES) > > > - rte_exit(EXIT_FAILURE, "Total sockets > > greater > > > than %u\n", RTE_MAX_NUMA_NODES); > > > - max_socket =3D sock_num; > > > + sock_num =3D rte_lcore_to_socket_id(i); > > +1 is missed? >=20 > I don't think so. > On previous implementation this logic was meant to find the max_socket. > max_socket was the first invalid socket_id and was used, for example : >=20 > if (socket_id >=3D max_socket) { >=20 > or >=20 > for (i =3D 0; i < max_socket; i++) >=20 > now, on above logic, we list the valid socket id. Therefore > rte_lcore_to_socket_id return a valid id and not need to add 1. >=20 >=20 OK, but at list the following check "if (sock_num > RTE_MAX_NUMA_NODES)" Should be "if (sock_num +1 > RTE_MAX_NUMA_NODES)", right? One more thing, if this patch is fixing a bug, I think "fix" should be adde= d in title. Thanks Jingjing