[PATCH] graph: fix xstats of cloned nodes
Robin Jarry
rjarry at redhat.com
Wed Jul 8 11:21:42 CEST 2026
Andrey Yudin, Jul 08, 2026 at 10:14:
> When cloning a node with xstats enabled, xstat_desc entries are copied
> into the rte_node_register structure, but the nb_xstats field is not.
>
> As a result, the cloned node reports zero available xstats,
> making xstats unusable.
>
> Copy the nb_xstats field when cloning the node so that cloned nodes
> preserve the xstats configuration of the original node.
>
> Fixes: 070db97e017b ("graph: support node xstats")
> Cc: stable at dpdk.org
> Signed-off-by: Andrey Yudin <Andrey.Yudin at infotecs.ru>
> ---
> lib/graph/node.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/graph/node.c b/lib/graph/node.c
> index 1fce3e6632..bb39c616de 100644
> --- a/lib/graph/node.c
> +++ b/lib/graph/node.c
> @@ -208,6 +208,7 @@ node_clone(struct node *node, const char *name)
> goto free;
> }
>
> + reg->xstats->nb_xstats = node->xstats->nb_xstats;
> for (i = 0; i < node->xstats->nb_xstats; i++)
> if (rte_strscpy(reg->xstats->xstat_desc[i], node->xstats->xstat_desc[i],
> RTE_NODE_XSTAT_DESC_SIZE) < 0)
Reviewed-by: Robin Jarry <rjarry at redhat.com>
More information about the stable
mailing list