fix check of port and core
cover fix check of port and core
Currently, some examples check that the port is on the same NUMA node as the polling thread for best performance. The method is to compare the socket id of port and that of current core. If the result is different, warning info will be given.
But it ignores the port which is from numa node 0, that is, no warning info will be given if the port is from numa node 0, and this set of patches will fix it.
Min Hu (Connor) (3):
examples/flow_classify: fix check of port and core examples/l2fwd-cat: fix check of port and core examples/skeleton: fix check of port and core
examples/flow_classify/flow_classify.c | 2 +- examples/l2fwd-cat/l2fwd-cat.c | 2 +- examples/skeleton/basicfwd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/3 examples/flow_classify: fix check of port and core
fix check of port and core in flow_classify example.
--- examples/flow_classify/flow_classify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/flow_classify/flow_classify.c +1 -1
@@ -284,7 +284,7 @@ lcore_main(struct flow_classifier *cls_app)* for best performance. */ 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",
Signature · 1 line
2.7.4
Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and core
27/03/2021 08:40, Min Hu (Connor):
examples/flow_classify/flow_classify.c lcore_main(struct flow_classifier *cls_app) · line 290
Quoted 13 lines
fix check of port and core in
flow_classifyexample.Fixes bab16ddaf2c1 ("examples/flow_classify: add sample application")Signed-off-by Min Hu (Connor) <[email protected]>---
examples/flow_classify/flow_classify.c +1
-1RTE_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.
Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and core
Quoted 6 lines · Thomas Monjalon
27/03/2021 08:40, Min Hu (Connor):
Quoted 5 lines
fix check of port and core in
flow_classifyexample.Fixes bab16ddaf2c1 ("examples/flow_classify: add sample application")
Quoted 12 lines
examples/flow_classify/flow_classify.c lcore_main(struct flow_classifier *cls_app) · line 290
Quoted 8 lines
Signed-off-by Min Hu (Connor) <[email protected]>---
RTE_ETH_FOREACH_DEV(port)examples/flow_classify/flow_classify.c +1
-1-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.
Thanks, Thomas.
Quoted 3 lines
.
Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and core
20/04/2021 04:26, Min Hu (Connor):
Quoted 48 lines
2021/4/20 9:08, Thomas Monjalon:
Quoted 6 lines
27/03/2021 08:40, Min Hu (Connor):
Quoted 5 lines
fix check of port and core in
flow_classifyexample.Fixes bab16ddaf2c1 ("examples/flow_classify: add sample application")Quoted 12 lines
examples/flow_classify/flow_classify.c lcore_main(struct flow_classifier *cls_app) · line 290
Quoted 8 lines
Signed-off-by Min Hu (Connor) <[email protected]>---
RTE_ETH_FOREACH_DEV(port)examples/flow_classify/flow_classify.c +1
-1-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.
Quoted 3 lines
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
Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and core
Hi Min,
Quoted 21 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, April 20, 2021 10:41 AM
To: Min Hu (Connor) <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Iremonger, Bernard <[email protected]>; Kantecki, Tomasz <[email protected]>; Richardson, Bruce <[email protected]>; Burakov, Anatoly <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and core20/04/2021 04:26, Min Hu (Connor):
Quoted 8 lines
2021/4/20 9:08, Thomas Monjalon:
Quoted 7 lines
27/03/2021 08:40, Min Hu (Connor):
Quoted 6 lines
fix check of port and core in
flow_classifyexample.Fixes bab16ddaf2c1 ("examples/flow_classify: add sampleapplication")
Cc: [email protected]
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
examples/flow_classify/flow_classify.c lcore_main(struct flow_classifier *cls_app) · line 287
Quoted 5 lines
Signed-off-by Min Hu (Connor) <[email protected]>---
RTE_ETH_FOREACH_DEV(port)examples/flow_classify/flow_classify.c +1
-1- 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).
If (rte_eth_dev_socket_id(port) != (int)rte_socket_id())
Quoted 47 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
rte_eth_dev_socket_id(port)!= (int)rte_socket_id()){
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
printf("\n\n"); printf("WARNING: port %u is on remote NUMAnode\n",
Quoted 3 lines
Quoted 3 lines
Please explain which case is broken and why.
If I understand well, we don't detect remote NUMA if not running on firstsocket.
Quoted 3 lines
Quoted 1 line
Hi, the code is this:
**********************************************************
***************Quoted 2 lines
/* * Check that the port is on the same NUMA node as the pollingthread
Quoted 5 lines
* 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()){
Quoted 2 lines
printf("\n\n"); printf("WARNING: port %u is on remote NUMAnode\n",
Quoted 7 lines
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");**********************************************************
************Quoted 12 lines
***
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.
Quoted 8 lines
Quoted 3 lines
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.
Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and core
Quoted 23 lines · Bernard
Hi Min,
Quoted 21 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, April 20, 2021 10:41 AM
To: Min Hu (Connor) <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Iremonger, Bernard <[email protected]>; Kantecki, Tomasz <[email protected]>; Richardson, Bruce <[email protected]>; Burakov, Anatoly <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and core20/04/2021 04:26, Min Hu (Connor):
Quoted 8 lines
2021/4/20 9:08, Thomas Monjalon:
Quoted 7 lines
27/03/2021 08:40, Min Hu (Connor):
Quoted 6 lines
fix check of port and core in
flow_classifyexample.Fixes bab16ddaf2c1 ("examples/flow_classify: add sampleapplication")
Cc: [email protected]
Quoted 9 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
examples/flow_classify/flow_classify.c lcore_main(struct flow_classifier *cls_app) · line 287
Quoted 5 lines
Signed-off-by Min Hu (Connor) <[email protected]>---
RTE_ETH_FOREACH_DEV(port)examples/flow_classify/flow_classify.c +1
-1- 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.
Quoted 62 lines
If (
rte_eth_dev_socket_id(port)!= (int)rte_socket_id())Quoted 47 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
rte_eth_dev_socket_id(port) != (int)rte_socket_id()){
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
printf("\n\n"); printf("WARNING: port %u is on remote NUMAnode\n",
Quoted 3 lines
Quoted 3 lines
Please explain which case is broken and why.
If I understand well, we don't detect remote NUMA if not running on firstsocket.
Quoted 3 lines
Quoted 1 line
Hi, the code is this:
**********************************************************
***************Quoted 2 lines
/* * Check that the port is on the same NUMA node as the pollingthread
Quoted 5 lines
* 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()){
Quoted 2 lines
printf("\n\n"); printf("WARNING: port %u is on remote NUMAnode\n",
Quoted 7 lines
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");**********************************************************
************Quoted 12 lines
***
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.Quoted 8 lines
Quoted 3 lines
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.
.
Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and core
Hi Min,
Quoted 46 lines
-----Original Message-----
From: Min Hu (Connor) <[email protected]>
Sent: Tuesday, April 27, 2021 1:23 PM
To: Iremonger, Bernard <[email protected]>; Thomas Monjalon <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Kantecki, Tomasz <[email protected]>; Richardson, Bruce <[email protected]>; Burakov, Anatoly <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and coreQuoted 23 lines · Bernard
Hi Min,
Quoted 21 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, April 20, 2021 10:41 AM
To: Min Hu (Connor) <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>; Iremonger, Bernard <[email protected]>; Kantecki, Tomasz <[email protected]>; Richardson, Bruce <[email protected]>; Burakov, Anatoly <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and core20/04/2021 04:26, Min Hu (Connor):
Quoted 8 lines
2021/4/20 9:08, Thomas Monjalon:
Quoted 7 lines
27/03/2021 08:40, Min Hu (Connor):
Quoted 6 lines
fix check of port and core in
flow_classifyexample.Fixes bab16ddaf2c1 ("examples/flow_classify: add sampleapplication")
Cc: [email protected]Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
examples/flow_classify/flow_classify.c lcore_main(struct flow_classifier *cls_app) · line 287
Quoted 5 lines
Signed-off-by Min Hu (Connor) <[email protected]>---
RTE_ETH_FOREACH_DEV(port)examples/flow_classify/flow_classify.c +1
-1- 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
Quoted 4 lines
(also tested on my system).
Quoted 1 line
Hi, '
rte_eth_dev_socket_id(port)' may return -1, we should avoid this situation.
Agreed.
Original fix is good.
Quoted 49 lines
Quoted 4 lines
If (
rte_eth_dev_socket_id(port)!= (int)rte_socket_id())Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
rte_eth_dev_socket_id(port) !=(int)rte_socket_id())
Quoted 3 lines
Quoted 3 lines
{
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
printf("\n\n"); printf("WARNING: port %u is on remoteNUMA
Quoted 10 lines
Quoted 10 lines
node\n",
Quoted 4 lines
Quoted 4 lines
Please explain which case is broken and why.
If I understand well, we don't detect remote NUMA if not running on firstsocket.
Quoted 3 lines
Quoted 1 line
Hi, the code is this:
**********************************************************
Quoted 13 lines
Quoted 13 lines
***************
Quoted 2 lines
/* * Check that the port is on the same NUMA node as the pollingthread
Quoted 5 lines
* 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()){
Quoted 2 lines
printf("\n\n"); printf("WARNING: port %u is on remote NUMAnode\n",
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
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");**********************************************************
Quoted 7 lines
Quoted 7 lines
************
Quoted 6 lines
***
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.
Quoted 20 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
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.
Quoted 12 lines
Quoted 7 lines
Quoted 2 lines
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.
Re: [dpdk-dev] [PATCH 1/3] examples/flow_classify: fix check of port and core
Hi Min,
<snip>
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
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
The EAL option "-w" has been replaced by the "-a" option in dpdk-20.05
Quoted 11 lines
Quoted 11 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
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.
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Well, using this patch, we can get the waring.
You need to explain which case was broken in the commit log. Thanks
Regards,
Bernard.
PATCH 2/3 examples/l2fwd-cat: fix check of port and core
In reply to Min Hu (Connor)fix check of port and core in l2fwd-cat example.
--- examples/l2fwd-cat/l2fwd-cat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l2fwd-cat/l2fwd-cat.c +1 -1
@@ -107,7 +107,7 @@ lcore_main(void)* for best performance. */ 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("WARNING, port %u is on remote NUMA node to "
Signature · 1 line
2.7.4
PATCH 3/3 examples/skeleton: fix check of port and core
In reply to Min Hu (Connor)fix check of port and core in skeleton example.
--- examples/skeleton/basicfwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/skeleton/basicfwd.c +1 -1
@@ -122,7 +122,7 @@ lcore_main(void)* for best performance. */ 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("WARNING, port %u is on remote NUMA node to "
Signature · 1 line
2.7.4
Hi,Ferruh, bernard, tomasz, bruce and all,
Any comments about this set of patches?
Quoted 19 lines · Min Hu (Connor)
Currently, some examples check that the port is on the same NUMA node as the polling thread for best performance. The method is to compare the socket id of port and that of current core. If the result is different, warning info will be given.
But it ignores the port which is from numa node 0, that is, no warning info will be given if the port is from numa node 0, and this set of patches will fix it.
Min Hu (Connor) (3):
examples/flow_classify: fix check of port and core examples/l2fwd-cat: fix check of port and core examples/skeleton: fix check of port and coreexamples/flow_classify/flow_classify.c | 2 +- examples/l2fwd-cat/l2fwd-cat.c | 2 +- examples/skeleton/basicfwd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
Hi,Ferruh, bernard, tomasz, bruce and all,
Any comments about this set of patches?
Quoted 24 lines · Min Hu (Connor)
Hi,Ferruh, bernard, tomasz, bruce and all,
Any comments about this set of patches?Quoted 14 lines · Min Hu (Connor)
Currently, some examples check that the port is on the same NUMA node as the polling thread for best performance. The method is to compare the socket id of port and that of current core. If the result is different, warning info will be given.
But it ignores the port which is from numa node 0, that is, no warning info will be given if the port is from numa node 0, and this set of patches will fix it.
Min Hu (Connor) (3):
examples/flow_classify: fix check of port and core examples/l2fwd-cat: fix check of port and core examples/skeleton: fix check of port and coreQuoted 5 lines
examples/flow_classify/flow_classify.c| 2 +-
examples/l2fwd-cat/l2fwd-cat.c | 2 +-
examples/skeleton/basicfwd.c | 2 +-3 files changed, 3 insertions(+), 3 deletions(-).
v2 cover fix check of port and core
In reply to Min Hu (Connor)Currently, some examples check that the port is on the same NUMA node as the polling thread for best performance. The method is to compare the socket id of port and that of current core. If the result is different, warning info will be given.
But it ignores the port which is from numa node 0, that is, no warning info will be given if the port is from numa node 0, and this set of patches will fix it.
---
v2:
* add more commit info.
Min Hu (Connor) (3):
examples/flow_classify: fix check of port and core examples/l2fwd-cat: fix check of port and core examples/skeleton: fix check of port and core
examples/flow_classify/flow_classify.c | 2 +- examples/l2fwd-cat/l2fwd-cat.c | 2 +- examples/skeleton/basicfwd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.7.4
PATCH v2 1/3 examples/flow_classify: fix check of port and core
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.
This patch can fix it.
--- examples/flow_classify/flow_classify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/flow_classify/flow_classify.c +1 -1
@@ -284,7 +284,7 @@ lcore_main(struct flow_classifier *cls_app)* for best performance. */ 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",
Signature · 1 line
2.7.4
Re: [dpdk-dev] [PATCH v2 1/3] examples/flow_classify: fix check of port and core
Hi Min,
Quoted 10 lines
-----Original Message-----
From: Min Hu (Connor) <[email protected]>
Sent: Wednesday, April 21, 2021 8:00 AM
To: [email protected]
Cc: Yigit, Ferruh <[email protected]>; Iremonger, Bernard <[email protected]>; Kantecki, Tomasz <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]
Subject: [PATCH v2 1/3] examples/flow_classify: fix check of port and core
Quoted 6 lines
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
The EAL option "-w" has been replaced by the "-a" option in dpdk-20.05
Quoted 30 lines
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.
This patch can fix it.
Fixes bab16ddaf2c1 ("examples/flow_classify: add sample application")Signed-off-by Min Hu (Connor) <[email protected]>--- examples/flow_classify/flow_classify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)examples/flow_classify/flow_classify.c +1
-1@@ -284,7 +284,7 @@ lcore_main(struct flow_classifier *cls_app)* for best performance. */ 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" );
Quoted 4 lines
printf("WARNING: port %u is on remote NUMA
node\n",
--
2.7.4
Re: [dpdk-dev] [PATCH v2 1/3] examples/flow_classify: fix check of port and core
Quoted 12 lines · Bernard
Hi Min,
Quoted 10 lines
-----Original Message-----
From: Min Hu (Connor) <[email protected]>
Sent: Wednesday, April 21, 2021 8:00 AM
To: [email protected]
Cc: Yigit, Ferruh <[email protected]>; Iremonger, Bernard <[email protected]>; Kantecki, Tomasz <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]
Subject: [PATCH v2 1/3] examples/flow_classify: fix check of port and core
Quoted 9 lines
Quoted 6 lines
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 93The EAL option "-w" has been replaced by the "-a" option in dpdk-20.05
Hi, thanks Iremonger, fixed in v3.
Quoted 38 lines
Quoted 30 lines
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.
This patch can fix it.
Fixes bab16ddaf2c1 ("examples/flow_classify: add sample application")Signed-off-by Min Hu (Connor) <[email protected]>--- examples/flow_classify/flow_classify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)examples/flow_classify/flow_classify.c +1
-1@@ -284,7 +284,7 @@ lcore_main(struct flow_classifier *cls_app)* for best performance. */ 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" );Quoted 4 lines
printf("WARNING: port %u is on remote NUMA
node\n",
--
2.7.4Tested-by Bernard Iremonger <[email protected]>.
PATCH v2 2/3 examples/l2fwd-cat: fix check of port and core
In reply to Min Hu (Connor)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.
This patch can fix it.
--- examples/l2fwd-cat/l2fwd-cat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l2fwd-cat/l2fwd-cat.c +1 -1
@@ -107,7 +107,7 @@ lcore_main(void)* for best performance. */ 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("WARNING, port %u is on remote NUMA node to "
Signature · 1 line
2.7.4
PATCH v2 3/3 examples/skeleton: fix check of port and core
In reply to Min Hu (Connor)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.
This patch can fix it.
--- examples/skeleton/basicfwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/skeleton/basicfwd.c +1 -1
@@ -122,7 +122,7 @@ lcore_main(void)* for best performance. */ 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("WARNING, port %u is on remote NUMA node to "
Signature · 1 line
2.7.4
v3 cover fix check of port and core
In reply to Min Hu (Connor)Currently, some examples check that the port is on the same NUMA node as the polling thread for best performance. The method is to compare the socket id of port and that of current core. If the result is different, warning info will be given.
But it ignores the port which is from numa node 0, that is, no warning info will be given if the port is from numa node 0, and this set of patches will fix it.
---
v3:
* change "-w" to "-a".
v2:
* add more commit info.
Min Hu (Connor) (3):
examples/flow_classify: fix check of port and core examples/l2fwd-cat: fix check of port and core examples/skeleton: fix check of port and core
examples/flow_classify/flow_classify.c | 2 +- examples/l2fwd-cat/l2fwd-cat.c | 2 +- examples/skeleton/basicfwd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.7.4
PATCH v3 1/3 examples/flow_classify: fix check of port and core
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 -a 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.
This patch can fix it.
--- examples/flow_classify/flow_classify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/flow_classify/flow_classify.c +1 -1
@@ -284,7 +284,7 @@ lcore_main(struct flow_classifier *cls_app)* for best performance. */ 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",
Signature · 1 line
2.7.4
Re: [dpdk-dev] [PATCH v3 1/3] examples/flow_classify: fix check of port and core
Quoted 18 lines
-----Original Message-----
From: Min Hu (Connor) <[email protected]>
Sent: Thursday, April 29, 2021 1:51 AM
To: [email protected]
Cc: Yigit, Ferruh <[email protected]>; Iremonger, Bernard <[email protected]>; [email protected]
Subject: [PATCH v3 1/3] examples/flow_classify: fix check of port and coreAccording 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 -a 0000:7d:00.1 -l 93
Here:
0000:7d:00.1 is on numa node 0.
core 93 is on numa node 3.
Quoted 8 lines
The two are not in same numa node, but no warning gives out in old codes.
This patch can fix it.
Fixes bab16ddaf2c1 ("examples/flow_classify: add sample application")Signed-off-by Min Hu (Connor) <[email protected]>
Re: [dpdk-dev] [PATCH v3 1/3] examples/flow_classify: fix check of port and core
Thanks Bernard .
Hi, Thomas, Ferruh, any other comments?
Quoted 32 lines · Bernard
Quoted 18 lines
-----Original Message-----
From: Min Hu (Connor) <[email protected]>
Sent: Thursday, April 29, 2021 1:51 AM
To: [email protected]
Cc: Yigit, Ferruh <[email protected]>; Iremonger, Bernard <[email protected]>; [email protected]
Subject: [PATCH v3 1/3] examples/flow_classify: fix check of port and coreAccording 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 -a 0000:7d:00.1 -l 93
Here:
0000:7d:00.1 is on numa node 0.
core 93 is on numa node 3.Quoted 8 lines
The two are not in same numa node, but no warning gives out in old codes.
This patch can fix it.
Fixes bab16ddaf2c1 ("examples/flow_classify: add sample application")Signed-off-by Min Hu (Connor) <[email protected]>Tested-by Bernard Iremonger <[email protected]>.
Re: [dpdk-dev] [PATCH v3 1/3] examples/flow_classify: fix check of port and core
Hi,
29/04/2021 11:37, Min Hu (Connor):
Quoted 3 lines
Thanks Bernard .
Hi, Thomas, Ferruh, any other comments?
No need to ask for more comments after each ack. We are very busy and we'll come to this patch on time. You are sending a lot of fixes. That's very good but we need time to digest them :)
Thanks
Re: [dpdk-dev] [PATCH v3 1/3] examples/flow_classify: fix check of port and core
Quoted 5 lines · Thomas Monjalon
Hi,
29/04/2021 11:37, Min Hu (Connor):
Quoted 2 lines
Thanks Bernard .
Quoted 8 lines
Quoted 1 line
Hi, Thomas, Ferruh, any other comments?
No need to ask for more comments after each ack. We are very busy and we'll come to this patch on time. You are sending a lot of fixes. That's very good but we need time to digest them :)
Thanks
Hi, Thomas,
Sorry for that. I will be waiting more patiently in future. Thanks.
Quoted 3 lines
.
PATCH v3 2/3 examples/l2fwd-cat: fix check of port and core
In reply to Min Hu (Connor)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 -a 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.
This patch can fix it.
--- examples/l2fwd-cat/l2fwd-cat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/l2fwd-cat/l2fwd-cat.c +1 -1
@@ -107,7 +107,7 @@ lcore_main(void)* for best performance. */ 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("WARNING, port %u is on remote NUMA node to "
Signature · 1 line
2.7.4
PATCH v3 3/3 examples/skeleton: fix check of port and core
In reply to Min Hu (Connor)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 -a 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.
This patch can fix it.
--- examples/skeleton/basicfwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
examples/skeleton/basicfwd.c +1 -1
@@ -122,7 +122,7 @@ lcore_main(void)* for best performance. */ 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("WARNING, port %u is on remote NUMA node to "
Signature · 1 line
2.7.4
Quoted 12 lines · Min Hu (Connor)
Currently, some examples check that the port is on the same NUMA node as the polling thread for best performance. The method is to compare the socket id of port and that of current core. If the result is different, warning info will be given.
But it ignores the port which is from numa node 0, that is, no warning info will be given if the port is from numa node 0, and this set of patches will fix it.
---
v3:
* change "-w" to "-a".
Quoted 8 lines
v2:
* add more commit info.Min Hu (Connor) (3):
examples/flow_classify: fix check of port and core examples/l2fwd-cat: fix check of port and core examples/skeleton: fix check of port and core
For series,
Only I am not sure if it is confusing to mention from 'flow_classify' in the commit log of 'l2fwd-cat' or 'skeleton' patches.
Thomas Monjalon
Applied12/05/2021 18:52, Ferruh Yigit:
Quoted 22 lines · Min Hu (Connor)
Quoted 12 lines
Currently, some examples check that the port is on the same NUMA node as the polling thread for best performance. The method is to compare the socket id of port and that of current core. If the result is different, warning info will be given.
But it ignores the port which is from numa node 0, that is, no warning info will be given if the port is from numa node 0, and this set of patches will fix it.
---
v3:
* change "-w" to "-a".Quoted 8 lines
v2:
* add more commit info.Min Hu (Connor) (3):
examples/flow_classify: fix check of port and core examples/l2fwd-cat: fix check of port and core examples/skeleton: fix check of port and core
Quoted 5 lines
For series,
Reviewed-by Ferruh Yigit <[email protected]>Only I am not sure if it is confusing to mention from '
flow_classify' in the commit log of 'l2fwd-cat' or 'skeleton' patches.
Yes it is confusing, I'll drop these comments.
The commits are still not explaining the issue is for devices on node 0, I'll reword a bit.
Applied, thanks.