eal: stop iteration after lcore info is processed
PATCH 1/1 eal: stop iteration after lcore info is processed
Telemetry iterates on lcore ID to collect info of a specific lcore. Since only one lcore is processed at a time, the iteration can stop when a matching lcore is found.
--- lib/eal/common/eal_common_lcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/eal/common/eal_common_lcore.c +2 -1
@@ -546,7 +546,8 @@ lcore_telemetry_info_cb(unsigned int lcore_id, void *arg)rte_tel_data_add_dict_uint (info->d,"busy_cycles" , usage.busy_cycles); } -return 0 ; +/* Return non-zero positive value to stop iterating over lcore_id. */ +return 1 ; } static int
Signature · 1 line
2.25.1
Quoted 11 lines · On Wed, 1 Nov 2023 15:20:53 +0800 Ruifeng Wang <[email protected]> wrote:
From: Ruifeng Wang <[email protected]>
To: Kevin Laatz <[email protected]>, Robin Jarry <[email protected]>, Morten Brørup <[email protected]>
Cc: [email protected], [email protected], [email protected], Ruifeng Wang <[email protected]>, [email protected]
Subject: [PATCH] eal: stop iteration after lcore info is processed
Date: Wed, 1 Nov 2023 15:20:53 +0800
X-Mailer: git-send-email 2.25.1Telemetry iterates on lcore ID to collect info of a specific lcore. Since only one lcore is processed at a time, the iteration can stop when a matching lcore is found.
Quoted 5 lines
Signed-off-by Ruifeng Wang <[email protected]>
Looks like a good optimization. Not sure it needs to go to stable.
Quoted 8 lines
Quoted 8 lines
Telemetry iterates on lcore ID to collect info of a specific lcore. Since only one lcore is processed at a time, the iteration can stop when a matching lcore is found.
Quoted 5 lines
Quoted 1 line
Signed-off-by Ruifeng Wang <[email protected]>Looks like a good optimization. Not sure it needs to go to stable.
Applied without "Cc:stable", thanks.
Ruifeng Wang, Nov 01, 2023 at 08:20:
Quoted 18 lines
Telemetry iterates on lcore ID to collect info of a specific lcore. Since only one lcore is processed at a time, the iteration can stop when a matching lcore is found.
Signed-off-by Ruifeng Wang <[email protected]>--- lib/eal/common/eal_common_lcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)lib/eal/common/eal_common_lcore.c +0
-0
lib/eal/common/eal_common_lcore.c lcore_telemetry_info_cb(unsigned int lcore_id, void *arg) · line 551
Quoted 7 lines
lib/eal/common/eal_common_lcore.c +2
-1@@ -546,7 +546,8 @@ lcore_telemetry_info_cb(unsigned int lcore_id, void *arg)rte_tel_data_add_dict_uint (info->d,"busy_cycles" , usage.busy_cycles); } -return 0 ; +/* Return non-zero positive value to stop iterating over lcore_id. */ +return 1 ; }
Hi Ruifeng, Nice catch.