From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 49625A0548; Tue, 27 Apr 2021 13:51:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2978340150; Tue, 27 Apr 2021 13:51:54 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 412614014E for ; Tue, 27 Apr 2021 13:51:52 +0200 (CEST) IronPort-SDR: BMmLR/tyD9qQFEEvsW2pV3AZ7fnfaY0W8AUaGvZwwLJEawBij9UObylP0MTn+g2i9izPqpELEB oCGNqiRizoJg== X-IronPort-AV: E=McAfee;i="6200,9189,9966"; a="196046341" X-IronPort-AV: E=Sophos;i="5.82,254,1613462400"; d="scan'208";a="196046341" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2021 04:51:43 -0700 IronPort-SDR: UjOXT3dn7wjXZTzdon9wJ6oYw6HxM3dvd5aW1A4uvY3rz6wWEwezlbX+E2WwYgyriItlOIu/2e G220Oqy/1EaA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,254,1613462400"; d="scan'208";a="457610951" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga002.fm.intel.com with ESMTP; 27 Apr 2021 04:51:43 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 27 Apr 2021 04:51:42 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 27 Apr 2021 04:51:42 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Tue, 27 Apr 2021 04:51:42 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Tue, 27 Apr 2021 04:51:42 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZnzFJTjz7Gd/fFGNILQD+SWys46oh+xGAmKxiAK9puMhCI12GC5NQxVAbGqr4tQ9fvkQQdbFBi2cOMz+deE+sr6xEO9xnvw5uumv/7XDeHOVFmdBnNuuU/yaifG3AlweRlhuq+U16rusyt5EMHxInmxf1RS66QW5m3HO1ywC7eUCzaWI+2bL5qY+6UIMjVA/FS7bTeOWN7kDqh/2HGcCw8YmHE55sTgsX44AGjJbAqwbBRDZsPL9nB2vxAChVYPr/pFzyrS2L4FXXsDlERc4i/Mh5x5Gv5NXYCw/iCaRVMSDyCQ4A/cc2qop4YhziqoHs8VMZjZ584qJANYhh+Yq6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VRNyY5qayf1Pa3bFyyU1ddDXyDw5oIF/LcyBSJS+LsI=; b=fKlC+3+9xxQlKffX1h3R2efRdORZpvOlALX3fU9G4nQ3LoYLI0A8Zim1oTBUJ/niPR5WkhiHxuNZl4qDzV8uetKgU2UvQ3N+sFW24VN+VDxLB2VZpabaIwfxnxA1VK+EypCwEkj7bICuHnf75o6wwSJjFLXgJ7EH1a8laMf3PD0I6lnO5FICEpfU5yF08T0nGxevpLhHc5nInn8VAJnxJQZ2kCk2Hb8HxjNDk6WgTZfs+KpnxwFgoCXe/S2db/s8+bTeQdY4n5oal4gl4ehzjaa3lklKOEgHDe6Ev6stKwM9fzEq0zj+IOr75VTJgWqN/DGoPV77fxSpoJtiLqFy6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VRNyY5qayf1Pa3bFyyU1ddDXyDw5oIF/LcyBSJS+LsI=; b=FuWZ8ZT0sHMZQ2mOWvv9ekbiIK3e8H+px93Zx3DAqcln2ALYEEL920nfAr9fKhiYsbJxKQJu6afGoexllu/EUgJnluO+3X/VY5s4j6iiVfJ2f0T7Eq5zEnqB1Xs3z/OKCnufHDuKuDaTsx+35ixdKr5i2jI3HctN//IJGhUmw+U= Received: from DM6PR11MB2890.namprd11.prod.outlook.com (2603:10b6:5:63::20) by DM6PR11MB3659.namprd11.prod.outlook.com (2603:10b6:5:13f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Tue, 27 Apr 2021 11:51:38 +0000 Received: from DM6PR11MB2890.namprd11.prod.outlook.com ([fe80::c448:f9a0:c163:8a6c]) by DM6PR11MB2890.namprd11.prod.outlook.com ([fe80::c448:f9a0:c163:8a6c%7]) with mapi id 15.20.4065.027; Tue, 27 Apr 2021 11:51:38 +0000 From: "Iremonger, Bernard" To: Thomas Monjalon , "Min Hu (Connor)" CC: "dev@dpdk.org" , "Yigit, Ferruh" , "Kantecki, Tomasz" , "Richardson, Bruce" , "Burakov, Anatoly" , "david.marchand@redhat.com" Thread-Topic: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and core Thread-Index: AQHXItxuMNIF4Zp+J0yB6V2nVH3k6qq8vYqAgAAVy4CAAHlrgIALI36w Date: Tue, 27 Apr 2021 11:51:38 +0000 Message-ID: References: <1616830818-3127-1-git-send-email-humin29@huawei.com> <1675114.mf6Gbu22uX@thomas> <7cd793c6-7a1e-f3dd-cf53-9b399ca03068@huawei.com> <7295111.aNunrXP4Or@thomas> In-Reply-To: <7295111.aNunrXP4Or@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=intel.com; x-originating-ip: [86.45.108.187] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d75db461-243f-4fc9-bd94-08d90972d0e4 x-ms-traffictypediagnostic: DM6PR11MB3659: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iPcebXlws0qqCxwjDY7d+TT2stxMAfvSzpgjawsqJIuFT34nSD998tL6K7EYcf3HJeQyIe/TGWz7xRsvb2u8JwiT3htIheuZo0QUcVHBzWr9M/tMYMvBcv6frcuNVfkZCFejet10AuyS441c9G90dnoahbLxIWJPY2luxd2KO+IUM/jFboZzJzwllbIkEEb8za7p48TcZ5hrFqQOq92VfM/UtFieySfF4o2fW4Cs2CZHsQI0FCsVyfMDlg7UIBDGzz8QDRll+pt0ZWkrVRaHMfr2WNuLpsyVmGM2HPMrnOTwY18UX3H3uO+AYWm/+JHrcPGZCpgjwy5ZYLxuDLhsJreubSP6Zx2/6y9e6qss/f0+vTZqTAl8iQYCIOHci6t7OWwYWjdu4TwQymEn72fN0yajRPnHgyExMjha/f5lgADoIvwEVrG1dCHRm2uh6SVtLVLOcFm0zBRnyaLaiFvPcm8L463wdgC84uEH54c7W/2jjIEVsZikdaYO0WFnHNLWMWAgjvGBvC9NkgjSS19hmAPjbPsL4FO3OTiZX6PFUSgonW7XI1akhrnLU1e9zBCzrAjDrZdElg3F3v6ivSERRBh5wlSlKLnLnK6YkMP7Nes= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2890.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(376002)(39860400002)(396003)(366004)(346002)(71200400001)(2906002)(8936002)(5660300002)(55016002)(76116006)(66946007)(54906003)(52536014)(38100700002)(122000001)(186003)(64756008)(53546011)(66446008)(4326008)(7696005)(83380400001)(6506007)(8676002)(66556008)(86362001)(110136005)(478600001)(26005)(316002)(9686003)(66476007)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?xzdIUEcGQQj3OYh6idd7gJz/svNzI1VlHujkhBnyLnxf7/PDj5Fvqm4Yq+6C?= =?us-ascii?Q?FpKxp5jhVZajc4qn4Ip882PVxTUyjnrB7s7DISIH7HA3ZZ5SusDAZnq5N1or?= =?us-ascii?Q?j5QtLNIYNOgttq9GmHC5MB9eiT7kxK9lqvE5Fk94XpuJRMSb0C1bOTG5tcau?= =?us-ascii?Q?5giS+zqD/XlZjKGoNeYm8seHe1/bGnRkrm2IGG+nj5o0xIOULRVLx1+Tv2Kx?= =?us-ascii?Q?va4h9WZ1sAA3SOAfLdXyldfoMegityyDZYKZndoSzhuDbU/8qhzOuXdsSvQ8?= =?us-ascii?Q?gExlqp1EY5pgbh3iKyfF9m7kEWQjrPK/GDHlEYkVZKd1j2MODp1DGNRSxaeO?= =?us-ascii?Q?2nBLWFEY46zdt6EWuYRaG586PyU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q?gQ/h0kroHbWdZUILg9qZE/oGwRvBstXa9wn5THuDfiR4BfYH9m1VHT44R0eK?= =?us-ascii?Q?vK6uGGEDvGv9Mcaqv48zb/9u?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB2890.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d75db461-243f-4fc9-bd94-08d90972d0e4 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Apr 2021 11:51:38.3740 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: YBbg3wdkUiPtonc6ehuAUsSddGU+SP5v/KGMK/JY543tkCwYia5aI2Q/3XF/GOZMYtOQBsRQ2Fw7Skc0QJ0mbHX6i4+FGR4JrOZ6yXfp1SY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3659 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and core X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Min, > -----Original Message----- > From: Thomas Monjalon > Sent: Tuesday, April 20, 2021 10:41 AM > To: Min Hu (Connor) > Cc: dev@dpdk.org; Yigit, Ferruh ; Iremonger, > Bernard ; Kantecki, Tomasz > ; Richardson, Bruce > ; Burakov, Anatoly > ; david.marchand@redhat.com > Subject: Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of > port and core >=20 > 20/04/2021 04:26, Min Hu (Connor): > > 2021/4/20 9:08, Thomas Monjalon: > > > 27/03/2021 08:40, Min Hu (Connor): > > >> fix check of port and core in flow_classify example. > > >> > > >> Fixes: bab16ddaf2c1 ("examples/flow_classify: add sample > > >> application") > > >> Cc: stable@dpdk.org > > >> > > >> Signed-off-by: Min Hu (Connor) > > >> --- > > >> RTE_ETH_FOREACH_DEV(port) > > >> - if (rte_eth_dev_socket_id(port) > 0 && > > >> + if (rte_eth_dev_socket_id(port) >=3D 0 && This fix works (I have tested it on my system) However a cleaner fix would be to drop the above line and add the if on the= next line instead (also tested on my system). If (rte_eth_dev_socket_id(port) !=3D (int)rte_socket_id()) > > >> rte_eth_dev_socket_id(port) !=3D (int)rte_socket_id()) > { > > >> printf("\n\n"); > > >> printf("WARNING: port %u is on remote NUMA > node\n", > > > > > > Please explain which case is broken and why. > > > If I understand well, we don't detect remote NUMA if not running on f= irst > socket. > > > > > Hi, the code is this: > > > ********************************************************** > *************** > > /* > > * Check that the port is on the same NUMA node as the polling > thread > > * for best performance. > > */ > > RTE_ETH_FOREACH_DEV(port) > > if (rte_eth_dev_socket_id(port) > 0 && > > rte_eth_dev_socket_id(port) !=3D (int)rte_socket_id()) > { > > printf("\n\n"); > > printf("WARNING: port %u is on remote NUMA > node\n", > > port); > > printf("to polling thread.\n"); > > printf("Performance will not be optimal.\n"); > > } > > printf("\nCore %u forwarding packets. ", rte_lcore_id()); > > printf("[Ctrl+C to quit]\n"); > > > ********************************************************** > ************ > > *** > > > > According to the comments and logging, the author just hope user to > > use the core and device which are in the same numa node for optimal > > performance. If not, A warning gives out. > > > > For example in flow_classify: > > ./build/flow_classify -w 0000:7d:00.1 -l 93 > > Here: > > 0000:7d:00.1 is on numa node 0. > > core 93 is on numa node 3. > > > > the two are not in same numa node, but no warning gives out in old code= s. > > > > Well, using this patch, we can get the waring. >=20 > You need to explain which case was broken in the commit log. > Thanks >=20 >=20 Regards, Bernard.