Skip to content

Commit

Permalink
eal: stop lcore iteration after getting telemetry info
Browse files Browse the repository at this point in the history
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: f2b852d ("eal: add lcore info in telemetry")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Robin Jarry <rjarry@redhat.com>
  • Loading branch information
Reyfone authored and tmonjalo committed Nov 6, 2023
1 parent a24456c commit d07e791
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/eal/common/eal_common_lcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,8 @@ lcore_telemetry_info_cb(unsigned int lcore_id, void *arg)
rte_tel_data_add_dict_string(info->d, "usage_ratio", ratio_str);
}

return 0;
/* Return non-zero positive value to stop iterating over lcore_id. */
return 1;
}

static int
Expand Down

0 comments on commit d07e791

Please sign in to comment.