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 8D7AEA0524; Tue, 20 Apr 2021 11:40:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74109412B0; Tue, 20 Apr 2021 11:40:51 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id D8DF1411A5 for ; Tue, 20 Apr 2021 11:40:49 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 7E1E4338C; Tue, 20 Apr 2021 05:40:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 20 Apr 2021 05:40:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= 04f1g31ypOYRcDWftYYwy+eZybFNLAuKrFnzKh5LEvM=; b=xMcBPNzFEggNNC3U krnPFlMeB1weDqJzRm/KZ1uKimizCloIAeCzqSgOxLzFnC/kHxWMuAviJJvpF/AU WQ2KoyRLqkB5OwJvr+aQMogJzwd18rjcyA5+xO9/qUWF1z6/Njoqodq2uv6l546F 3FX+2R/AAbakiBkwTiJEtoYY+EFLamRTybHw3led0bFYlhhsFkB1Fw/jdmWogHH4 BSFXAV7Sw+wl3Kc8hFoG6xljduJKd4kqRf/Z4ZAzEG0IyV73WAOMJVeG/7QkBLDN kFDRkld0T1lwQ1DCZus+21PAra/Gw/aZCpqVdPRZRzk9JSLCZuYY9oQI2FDzJlDe 2HozDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=04f1g31ypOYRcDWftYYwy+eZybFNLAuKrFnzKh5LE vM=; b=YYgvMtJBnpe6dAnfKm4oFSOoeGqu0H4KfnUa1TpIwo6+ars8S3IbeHN5z xCEkVNGVAhBgWl0gtb5C4MSPe+vL2DxVv0AN/iKUzwMVSJgAsYi/45uQjwOppo/C M9zbeIOwCX1HFq2uuVG2BuZyg4F8AhATqWi+f8kTIAh++hSZtNbqiN6idHsa16cn ok6ZIhP9w+g1bV7fNGiL3/1hYPDWLc5rMt2CaXrg+Ezi7Taiye30gk52TMNffnZa KZjzkpCwvGSbq3wV96luaOAMY9goA7upTiAod1ckjOr8pk8LqKXtnQAGeO+4y3MI fPdYwtclljSOH4yIPDvOfMbIzefbQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddtiedgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 518ED1080063; Tue, 20 Apr 2021 05:40:46 -0400 (EDT) From: Thomas Monjalon To: "Min Hu (Connor)" Cc: dev@dpdk.org, ferruh.yigit@intel.com, bernard.iremonger@intel.com, tomasz.kantecki@intel.com, bruce.richardson@intel.com, anatoly.burakov@intel.com, david.marchand@redhat.com Date: Tue, 20 Apr 2021 11:40:45 +0200 Message-ID: <7295111.aNunrXP4Or@thomas> In-Reply-To: <7cd793c6-7a1e-f3dd-cf53-9b399ca03068@huawei.com> References: <1616830818-3127-1-git-send-email-humin29@huawei.com> <1675114.mf6Gbu22uX@thomas> <7cd793c6-7a1e-f3dd-cf53-9b399ca03068@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 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) >= 0 && > >> rte_eth_dev_socket_id(port) != (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) != (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