[PATCH 2/2] common/cnxk: fix thread-unsafe NIX telemetry parsing

Jerin Jacob jerinjacobk at gmail.com
Tue Jun 9 07:02:54 CEST 2026


On Sat, Jun 6, 2026 at 4:15 AM Stephen Hemminger
<stephen at networkplumber.org> wrote:
>
> cnxk_nix_tel_handle_info_x() backs the /cnxk/nix/{rq,cq,sq}/{info,ctx}
> telemetry commands and parsed its "<pcidev>,<queue_id>" parameter with
> strtok(), which keeps non-reentrant state and races when telemetry
> callbacks run on per-connection threads.
>
> Split the parameter with strchr() and parse the queue id with strtoul().
> While here, copy the full parameter (the length was capped at
> PCI_PRI_STR_SIZE + 1, truncating the id for longer device addresses) and
> reject non-numeric or out-of-range ids instead of letting strtol() alias
> them to queue 0.
>
> Fixes: af75aac78978 ("common/cnxk: support telemetry for NIX")
> Cc: stable at dpdk.org
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>

@Nithin Dabilpuram  Please review and Ack the series.


More information about the dev mailing list