[PATCH] eal: stop iteration after lcore info is processed
Robin Jarry
rjarry at redhat.com
Thu Nov 2 10:57:12 CET 2023
Ruifeng Wang, Nov 01, 2023 at 08:20:
> 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 at redhat.com
> Cc: stable at dpdk.org
>
> Signed-off-by: Ruifeng Wang <ruifeng.wang at 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;
> }
Hi Ruifeng, Nice catch.
Reviewed-by: Robin Jarry <rjarry at redhat.com>
More information about the stable
mailing list