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 AFA79A0A02; Tue, 27 Apr 2021 15:06:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 257B440150; Tue, 27 Apr 2021 15:06:35 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 5D3B44014E for ; Tue, 27 Apr 2021 15:06:33 +0200 (CEST) IronPort-SDR: Oq+ryiAFRv4k/3lIfbz+YWRZ9pINB0BoD8qqPPysLxrx8SCwnrdrndp/8yvSJoc4B8KiZc/4kG Vcn4nZRFhayA== X-IronPort-AV: E=McAfee;i="6200,9189,9966"; a="260457675" X-IronPort-AV: E=Sophos;i="5.82,254,1613462400"; d="scan'208";a="260457675" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2021 06:06:31 -0700 IronPort-SDR: mU1hHQ4S/J2Sj03+dtH8oXGGpmxJHQyKV5D6ctt5Ij1cClzIxuq+mppRx/YoTY/hVdyl9XigUV w5ssyUQSkFeA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,254,1613462400"; d="scan'208";a="393048930" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga007.fm.intel.com with ESMTP; 27 Apr 2021 06:06:31 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX602.amr.corp.intel.com (10.22.229.15) 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 06:06:30 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX608.amr.corp.intel.com (10.22.229.21) 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 06:06:30 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx606.amr.corp.intel.com (10.22.229.19) 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 06:06:30 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.59) by edgegateway.intel.com (134.134.137.103) 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 06:06:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FkM73S0wH9u14iXqKuz8y02INlXuR0ube4autQDEFsM+saYBAon1gaoSRVySRudRAkAqSVMPTynRPVJPHA3NauDrX2wOCuRCfoxYoDMZwpgQ1F14lxvJnFN9wS7U8tlpwTao2hrv7F24+F4+L8aejGKlePyH+dY/+Yt0K57vTIYXTCjK7bxnTYIJOe88uQOj8xMjP5GRKVaPS+vdfgeqYLrtGsh1YEqTgFnsupY9rf2xtltGBIlD2U2BBZPoXlnuxHFxevUG0P8JF2t0fapTxC147vWVAr+LSm3rhkMjV8+9uo86Lz/BxZ927RF4l5IflNKTxFHsAh8a3fRF0EEQPg== 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=Miq3bjW/DM7rvUUDHf20gqoZWcllIrISXMlPwWR3N84=; b=hmaRM/GrPuVDqruMqpFw/l2tfbGPM89YMRp79hfgq5jhGOsCsbBcyNQFqPgb7/BLYx7RPz2nsa26TlRzTVNZ0YMD76Y4/qG5fqtIdNViYDngWvRpCEeW5hmBgI1W2t4uSOf7XPO3oEpBIMmuZEsRgJvBLdywdKm/EsGuUqSm2Z8fIoM8dhvlWiT/2pO5pvWpZh9IiKG0wk35QDTx0j+SisfJpjGZEdct3pvPR+Ga6DYP3L3Ug9QOE5eV2491rvZhhlfhao6+poh8SuULHb20vI+0ytTrjxt7+MCBPj/C2Ihl91OgBtauMvqJ/LcTiyustYdIyXPO9xkpLrnOmJFfHA== 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=Miq3bjW/DM7rvUUDHf20gqoZWcllIrISXMlPwWR3N84=; b=gWAgN1X6B1LTMbh3qcynL6PfCNzr2kca06Pnr0/23UrXkIGTBV3m1vNIKWPRymGnFlCqEHIAmQOOyNnrcb9HgquDAwle1sUv4OtkGDrZz2jljOFZvfAEHBK8+D32ToO5++zMxSsL6qCWtFUitvDb4edOkXCKDg1JTs9Jk1bVyM0= Received: from DM6PR11MB2890.namprd11.prod.outlook.com (2603:10b6:5:63::20) by DM6PR11MB3498.namprd11.prod.outlook.com (2603:10b6:5:6c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.26; Tue, 27 Apr 2021 13:06:27 +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 13:06:27 +0000 From: "Iremonger, Bernard" To: "Min Hu (Connor)" , Thomas Monjalon 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+J0yB6V2nVH3k6qq8vYqAgAAVy4CAAHlrgIALI36wgAAKKoCAAAt+QA== Date: Tue, 27 Apr 2021 13:06:27 +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> <0d828361-15ae-6bb4-4d70-f25543b37f90@huawei.com> In-Reply-To: <0d828361-15ae-6bb4-4d70-f25543b37f90@huawei.com> 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: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; 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: 3772c07d-71d9-43f2-9909-08d9097d448a x-ms-traffictypediagnostic: DM6PR11MB3498: 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: x99q2UNXq447FfftdhokrYifPi4gj608zeUNGy/L5CcqR+8lBvUVTmTJLHHyvh6qUaxNYx98zR1XwixhP+oG6CSz3ug4tELobz7RG3+Snya0S7InZSc2vzDwlbixCmCzB25psi0B+I72djY3sV22j/rINvihtVDYIngTwpWtIEV7FkeXBWjU7ERDi9viMS4HS645aM112Tp0iQq4OpZOneVgGJvgPN4hDESMIEMVFJORKMnZCpEYp3fqH8Q+hkowjEz6pJN34vTuAOaq+8r+J6saV0dgLnDw4iP0PGqu2RA2uRezg89LuRbx+uWBk2v9lygXjKvV7ZcEB6An5J+9slaRQbF/iIvhBlaIHx3U4uxsbrWfI5bdjVAP3FD1tb207SLhg5XZdyw9vOPmC3yQr+fzaSJKc9//Ij8kwClpHPQUbq9MIpgZMMAQB1qJFueDBu89TeINaRqUM0x0HabYPzEbHP9lvMqehz38eG6oAqZKAMAbdQcHglBgn6mzbIu1ru6KWTNYc+QnFI8YtY6ITHCM0/U6diLlQ8obTv/YSepiWcUBlKHxgnXEkC9jXOcRW391XzycS7MxnwfeT4TWCo/c+D4sIfOmevRbuLzoyIw= 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)(396003)(366004)(39860400002)(376002)(346002)(8936002)(54906003)(9686003)(83380400001)(110136005)(86362001)(52536014)(66476007)(71200400001)(33656002)(122000001)(7696005)(66446008)(55016002)(66556008)(64756008)(66946007)(316002)(76116006)(26005)(53546011)(6506007)(5660300002)(4326008)(2906002)(38100700002)(478600001)(186003)(8676002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?iso-2022-jp?B?MzREcXlmeGFtZ0xXdmRwclFiUXBNYTBzNU9hUVIrcmM3ekdmWXRZOXdJ?= =?iso-2022-jp?B?dmVHQ2ZtY0d4Y1ZOOWRaUVpiSjFFYXhTWWJjQmthRndBM29qWENWZXNF?= =?iso-2022-jp?B?ZzA5cDRBMjhueHh5dmxpK1BBQUdzbXJIcXRHUm1KRlQvUndMUU4ySkJP?= =?iso-2022-jp?B?SzlIV0hENlN4bjBBWGNYZzFLM3hhbGxvakhvZjNTWkQySGNFUkFDMm1y?= =?iso-2022-jp?B?bkJkV2tQRGpjVFIxUnFUTHRFZ1Q3M0dnWGNSV0NyUXFVaXdhdjRuTkVw?= =?iso-2022-jp?B?ellLMFRqQnlmQzNFdVlNU0I5S0JOSllHNTJPL2NEKzJVK0h4YWxoK0xL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FwM1NxdG41bTNONlZK?= =?iso-2022-jp?B?RXVDU1BINlJhamtvVllNZVQ1NGdQdkZMZEtRYk5UNUE1QkZKb0dFWCsz?= =?iso-2022-jp?B?STI5WFYvMVpZZXJwOVV4NUxyV05NK09YamZ6SjJjMDVoYlVrbTcvU0lS?= =?iso-2022-jp?B?U0QwMUpOSkZaU3daQkFTTk8rUzRCaGw1RlpFYklibUF5T0h6YWhFeldL?= =?iso-2022-jp?B?U2JzcThoQzlJa2NoeHBDNFJXQXFlb2Q4UlU0U1B4ZEpoSnFmMWNCRjc4?= =?iso-2022-jp?B?WG5iVzdJc1BhYUQ5US9YZDM0SEFkczJnR3hSUm5peGE3MHdXNmVKUEEw?= =?iso-2022-jp?B?aUdienRISXk3Y0orZE1wa3VhdCtpOCtVZGhrUW1PZHEwdkRDYnhCYlNq?= =?iso-2022-jp?B?TXphMWU5ZWhuVzBaT2ZxbnNqT2VBTHk4QkpZTGhRcHVWWTZrZjJidU0r?= =?iso-2022-jp?B?WEg4S29sSVBpRzBjdDBKQ1pWQlJ2Y0tWdDk0WW5MU3RoMGRwVWxnMUYr?= =?iso-2022-jp?B?Ky9WUXhUOXdGUm9RNTc2QVN5U1BGUWVWZHF0MTBOOC95VXl5WC84Z3R4?= =?iso-2022-jp?B?bG1qbWk1bDFlOThGdi9HeFhoNk9BOTBIcVJJcXJsQUVwMk9ydkl0MDZk?= =?iso-2022-jp?B?RUF4bGxDa3o0Q2k0dDlBbHVPN0QyVGQvdnE1Y2hYMExxNTBQUk1VTlBL?= Content-Type: text/plain; charset="iso-2022-jp" 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: 3772c07d-71d9-43f2-9909-08d9097d448a X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Apr 2021 13:06:27.3462 (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: bNubbZXy6sZcFD2SPqXX+dFPGF8ad+m7Jaledz4ZJPJeTAdEQ+F9YcvFkmhg/ero4MqrqC4i+6Ppgb1+dUcSBAIVhviiJWGfg4+RS+0qRjU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3498 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: Min Hu (Connor) > Sent: Tuesday, April 27, 2021 1:23 PM > To: Iremonger, Bernard ; Thomas Monjalon > > Cc: dev@dpdk.org; Yigit, Ferruh ; Kantecki, Tomas= z > ; 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 >=20 > =1B$B:_=1B(B 2021/4/27 19:51, Iremonger, Bernard =1B$B > 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/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). > > > Hi, 'rte_eth_dev_socket_id(port)' may return -1, we should avoid this > situation. Agreed. Original fix is good. >=20 > > 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 > >>>> first > >> 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 > codes. > >>> > >>> Well, using this patch, we can get the waring. > >> > >> You need to explain which case was broken in the commit log. > >> Thanks > >> > >> > > Regards, > > > > Bernard. > > . > > Regards, Bernard.