examples/helloworld: add output of core id and socket id
PATCH 1/1 examples/helloworld: add output of core id and socket id
Adding output of core id and socket id of each lcore/pthread can help to understand their relationship.
And this can also help to examine the usage of the EAL lcore settings like -c, -l and --lcore .
--- examples/helloworld/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
examples/helloworld/main.c +3 -1
@@ -50,7 +50,9 @@ lcore_hello(__attribute__((unused)) void *arg) {unsigned lcore_id; lcore_id =rte_lcore_id (); -printf ("hello from core %u\n" , lcore_id); +printf ("hello from core %2u at core_id = %2u on socket_id = %2u\n" , + lcore_id, lcore_config[lcore_id].core_id, + lcore_config[lcore_id].socket_id);return 0 ; }
Signature · 1 line
2.7.4
Quoted 15 lines · Wei Dai
Adding output of core id and socket id of each lcore/pthread can help to understand their relationship.
And this can also help to examine the usage of the EAL lcore settings like -c, -l and --lcore .Signed-off-by Wei Dai <[email protected]>--- examples/helloworld/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)examples/helloworld/main.c +0
-0
examples/helloworld/main.c lcore_hello(__attribute__((unused)) void *arg) · line 53
Quoted 5 lines
examples/helloworld/main.c +1
-1@@ -50,7 +50,9 @@ lcore_hello(__attribute__((unused)) void *arg) {unsigned lcore_id; lcore_id =rte_lcore_id (); -printf ("hello from core %u\n" , lcore_id); + printf("hello from core %2u at core_id = %2u on socket_id = %2u\n",
It is hard to understand difference from "core" and "core_id", what do you think using "lcore" and "core" respectively in the message?
Quoted 6 lines
examples/helloworld/main.c +2
-0+ lcore_id, lcore_config[lcore_id].core_id, + lcore_config[lcore_id].socket_id);return 0 ; }
Quoted 20 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Wednesday, May 17, 2017 10:16 PM
To: Dai, Wei <[email protected]>; Richardson, Bruce <[email protected]>; Mcnamara, John <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] examples/helloworld: add output of core id and socket idQuoted 10 lines · Wei Dai
Adding output of core id and socket id of each lcore/pthread can help to understand their relationship.
And this can also help to examine the usage of the EAL lcore settings like -c, -l and --lcore .Signed-off-by Wei Dai <[email protected]>--- examples/helloworld/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 12 lines
examples/helloworld/main.c lcore_hello(__attribute__((unused)) void *arg) { · line 52
Quoted 9 lines
examples/helloworld/main.c +1
-1@@ -50,7 +50,9 @@ lcore_hello(__attribute__((unused)) void *arg) {unsigned lcore_id; lcore_id =rte_lcore_id (); -printf ("hello from core %u\n" , lcore_id); + printf("hello from core %2u at core_id = %2u on socket_id = %2u\n",It is hard to understand difference from "core" and "
core_id", what do you think using "lcore" and "core" respectively in the message?
Yes, it is still a bit confused.
I should change it to printf("hello from lcore_id = %2u at core_id = %2u on socket_id = %2u\n",
Quoted 7 lines
Quoted 7 lines
examples/helloworld/main.c +2
-0+ lcore_id, lcore_config[lcore_id].core_id, + lcore_config[lcore_id].socket_id);return 0 ; }
Quoted 32 lines · Wei
Quoted 20 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Wednesday, May 17, 2017 10:16 PM
To: Dai, Wei <[email protected]>; Richardson, Bruce <[email protected]>; Mcnamara, John <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] examples/helloworld: add output of core id and socket idQuoted 10 lines · Wei Dai
Adding output of core id and socket id of each lcore/pthread can help to understand their relationship.
And this can also help to examine the usage of the EAL lcore settings like -c, -l and --lcore .Signed-off-by Wei Dai <[email protected]>--- examples/helloworld/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)Quoted 12 lines
examples/helloworld/main.c lcore_hello(__attribute__((unused)) void *arg) { · line 52
Quoted 9 lines
examples/helloworld/main.c +1
-1@@ -50,7 +50,9 @@ lcore_hello(__attribute__((unused)) void *arg) {unsigned lcore_id; lcore_id =rte_lcore_id (); -printf ("hello from core %u\n" , lcore_id); + printf("hello from core %2u at core_id = %2u on socket_id = %2u\n",It is hard to understand difference from "core" and "
core_id", what do you think using "lcore" and "core" respectively in the message?
Quoted 2 lines
Yes, it is still a bit confused.
I should change it to printf("hello fromlcore_id= %2u atcore_id= %2u onsocket_id= %2u\n",
+1
Quoted 9 lines
Quoted 8 lines
Quoted 8 lines
examples/helloworld/main.c +2
-0+ lcore_id, lcore_config[lcore_id].core_id, + lcore_config[lcore_id].socket_id);return 0 ; }