[PATCH v6 1/3] graph: add support for node specific xstats
Jerin Jacob
jerinjacobk at gmail.com
Tue Oct 15 06:57:57 CEST 2024
On Mon, Oct 14, 2024 at 9:41 PM <pbhagavatula at marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula at marvell.com>
>
> Add ability for Nodes to advertise xstat counters
> during registration and increment them in fastpath.
> Add support for retrieving/printing stats for node
> specific xstats using rte_graph_cluster_stats_get().
> Add `rte_node_xstat_increment` API to increment node
> specific xstat counters.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
> Acked-by: Kiran Kumar K <kirankumark at marvell.com>
> Reviewed-by: Robin Jarry <rjarry at redhat.com>
> ---
> doc/guides/prog_guide/graph_lib.rst | 22 +++++--
> doc/guides/rel_notes/deprecation.rst | 6 --
> doc/guides/rel_notes/release_24_11.rst | 8 +++
> lib/graph/graph_populate.c | 20 ++++++-
> lib/graph/graph_private.h | 3 +
> lib/graph/graph_stats.c | 79 +++++++++++++++++++++++++-
> lib/graph/node.c | 37 +++++++++++-
> lib/graph/rte_graph.h | 11 ++++
> lib/graph/rte_graph_worker_common.h | 23 ++++++++
> lib/graph/version.map | 7 +++
> 10 files changed, 201 insertions(+), 15 deletions(-)
>
Doxygen comment is missing for rte_node_xstats structure.
> +struct rte_node_xstats {
> + uint16_t nb_xstats; /**< Number of xstats. */
> + char xstat_desc[][RTE_NODE_XSTAT_DESC_SIZE]; /**< Names of xstats. */
> +};
> +
>
> +/**
> + * Increment Node xstat count.
> + *
> + * Increment the count of an xstat for a given node.
> + *
> + * @param node
> + * Pointer to the node.
> + * @param xstat_id
> + * Error ID.
Extend stats ID
With the above fixes:
Acked-by: Jerin Jacob <jerinj at marvell.com>
> + * @param value
> + * Value to increment.
> + */
> +__rte_experimental
> +static inline void
> +rte_node_xstat_increment(struct rte_node *node, uint16_t xstat_id, uint64_t value)
> +{
> + if (rte_graph_has_stats_feature()) {
> + uint64_t *xstat = (uint64_t *)RTE_PTR_ADD(node, node->xstat_off);
> + xstat[xstat_id] += value;
> + }
> +}
> +
More information about the dev
mailing list