patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] eal: stop iteration after lcore info is processed
@ 2023-11-01  7:20 Ruifeng Wang
  2023-11-01 18:13 ` Stephen Hemminger
  2023-11-02  9:57 ` Robin Jarry
  0 siblings, 2 replies; 4+ messages in thread
From: Ruifeng Wang @ 2023-11-01  7:20 UTC (permalink / raw)
  To: Kevin Laatz, Robin Jarry, Morten Brørup
  Cc: dev, honnappa.nagarahalli, nd, Ruifeng Wang, stable

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.

Fixes: f2b852d909f9 ("eal: add lcore info in telemetry")
Cc: rjarry@redhat.com
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 lib/eal/common/eal_common_lcore.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/eal/common/eal_common_lcore.c b/lib/eal/common/eal_common_lcore.c
index ceda714ca5..0d6812ec75 100644
--- a/lib/eal/common/eal_common_lcore.c
+++ b/lib/eal/common/eal_common_lcore.c
@@ -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
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-06 17:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-01  7:20 [PATCH] eal: stop iteration after lcore info is processed Ruifeng Wang
2023-11-01 18:13 ` Stephen Hemminger
2023-11-06 17:04   ` Thomas Monjalon
2023-11-02  9:57 ` Robin Jarry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).