From: "Min Hu (Connor)" <humin29@huawei.com> To: "Iremonger, Bernard" <bernard.iremonger@intel.com>, Thomas Monjalon <thomas@monjalon.net> Cc: "dev@dpdk.org" <dev@dpdk.org>, "Yigit, Ferruh" <ferruh.yigit@intel.com>, "Kantecki, Tomasz" <tomasz.kantecki@intel.com>, "Richardson, Bruce" <bruce.richardson@intel.com>, "Burakov, Anatoly" <anatoly.burakov@intel.com>, "david.marchand@redhat.com" <david.marchand@redhat.com> Subject: Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and core Date: Tue, 27 Apr 2021 20:23:01 +0800 Message-ID: <0d828361-15ae-6bb4-4d70-f25543b37f90@huawei.com> (raw) In-Reply-To: <DM6PR11MB289030B612C25CDB01025AD5EF419@DM6PR11MB2890.namprd11.prod.outlook.com> 在 2021/4/27 19:51, Iremonger, Bernard 写道: > Hi Min, > >> -----Original Message----- >> From: Thomas Monjalon <thomas@monjalon.net> >> Sent: Tuesday, April 20, 2021 10:41 AM >> To: Min Hu (Connor) <humin29@huawei.com> >> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; Iremonger, >> Bernard <bernard.iremonger@intel.com>; Kantecki, Tomasz >> <tomasz.kantecki@intel.com>; Richardson, Bruce >> <bruce.richardson@intel.com>; Burakov, Anatoly >> <anatoly.burakov@intel.com>; 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) <humin29@huawei.com> >>>>> --- >>>>> RTE_ETH_FOREACH_DEV(port) >>>>> - if (rte_eth_dev_socket_id(port) > 0 && >>>>> + if (rte_eth_dev_socket_id(port) >= 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. > If (rte_eth_dev_socket_id(port) != (int)rte_socket_id()) > >>>>> 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 >> >> > Regards, > > Bernard. > . >
next prev parent reply other threads:[~2021-04-27 12:23 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-27 7:40 [dpdk-dev] [PATCH 0/3] " Min Hu (Connor) 2021-03-27 7:40 ` [dpdk-dev] [PATCH 1/3] examples/flow_classify: " Min Hu (Connor) 2021-04-20 1:08 ` Thomas Monjalon 2021-04-20 2:26 ` Min Hu (Connor) 2021-04-20 9:40 ` Thomas Monjalon 2021-04-27 11:51 ` Iremonger, Bernard 2021-04-27 12:23 ` Min Hu (Connor) [this message] 2021-04-27 13:06 ` Iremonger, Bernard 2021-04-28 9:26 ` Iremonger, Bernard 2021-03-27 7:40 ` [dpdk-dev] [PATCH 2/3] examples/l2fwd-cat: " Min Hu (Connor) 2021-03-27 7:40 ` [dpdk-dev] [PATCH 3/3] examples/skeleton: " Min Hu (Connor) 2021-04-10 9:14 ` [dpdk-dev] [PATCH 0/3] " Min Hu (Connor) 2021-04-19 7:44 ` Min Hu (Connor) 2021-04-21 7:00 ` [dpdk-dev] [PATCH v2 " Min Hu (Connor) 2021-04-21 7:00 ` [dpdk-dev] [PATCH v2 1/3] examples/flow_classify: " Min Hu (Connor) 2021-04-28 13:29 ` Iremonger, Bernard 2021-04-29 0:51 ` Min Hu (Connor) 2021-04-21 7:00 ` [dpdk-dev] [PATCH v2 2/3] examples/l2fwd-cat: " Min Hu (Connor) 2021-04-21 7:00 ` [dpdk-dev] [PATCH v2 3/3] examples/skeleton: " Min Hu (Connor) 2021-04-29 0:50 ` [dpdk-dev] [PATCH v3 0/3] " Min Hu (Connor) 2021-04-29 0:50 ` [dpdk-dev] [PATCH v3 1/3] examples/flow_classify: " Min Hu (Connor) 2021-04-29 9:07 ` Iremonger, Bernard 2021-04-29 9:37 ` Min Hu (Connor) 2021-04-29 11:44 ` Thomas Monjalon 2021-04-29 12:15 ` Min Hu (Connor) 2021-04-29 0:50 ` [dpdk-dev] [PATCH v3 2/3] examples/l2fwd-cat: " Min Hu (Connor) 2021-04-29 0:50 ` [dpdk-dev] [PATCH v3 3/3] examples/skeleton: " Min Hu (Connor) 2021-05-12 16:52 ` [dpdk-dev] [PATCH v3 0/3] " Ferruh Yigit 2021-05-12 19:16 ` Thomas Monjalon
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=0d828361-15ae-6bb4-4d70-f25543b37f90@huawei.com \ --to=humin29@huawei.com \ --cc=anatoly.burakov@intel.com \ --cc=bernard.iremonger@intel.com \ --cc=bruce.richardson@intel.com \ --cc=david.marchand@redhat.com \ --cc=dev@dpdk.org \ --cc=ferruh.yigit@intel.com \ --cc=thomas@monjalon.net \ --cc=tomasz.kantecki@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git