* [PATCH v2] graph: fix xstats description allocation
[not found] <20251028101333.14776-1-cfontain@redhat.com>
@ 2025-10-28 11:09 ` Christophe Fontaine
0 siblings, 0 replies; only message in thread
From: Christophe Fontaine @ 2025-10-28 11:09 UTC (permalink / raw)
To: Jerin Jacob, Kiran Kumar K, Nithin Dabilpuram, Zhirun Yan,
Pavan Nikhilesh, Robin Jarry
Cc: dev, stable, Christophe Fontaine
Fix the extended stats name allocation size: instead of allocating
RTE_NODE_XSTAT_DESC_SIZE (64 bytes), only sizeof(RTE_NODE_XSTAT_DESC_SIZE)
were allocated for each xstat name.
Fixes: 070db97e017b ("graph: support node xstats")
Signed-off-by: Christophe Fontaine <cfontain@redhat.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
Notes:
v2: add acked-by
fix sha length
lib/graph/graph_stats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/graph/graph_stats.c b/lib/graph/graph_stats.c
index e0fc8fd25c..b87b5707f7 100644
--- a/lib/graph/graph_stats.c
+++ b/lib/graph/graph_stats.c
@@ -302,7 +302,7 @@ stats_mem_populate(struct rte_graph_cluster_stats *stats,
graph_node->node->name, graph->name);
cluster->stat.xstat_desc = rte_zmalloc_socket(NULL,
- sizeof(RTE_NODE_XSTAT_DESC_SIZE) * graph_node->node->xstats->nb_xstats,
+ RTE_NODE_XSTAT_DESC_SIZE * graph_node->node->xstats->nb_xstats,
RTE_CACHE_LINE_SIZE, stats->socket_id);
if (cluster->stat.xstat_desc == NULL) {
rte_free(cluster->stat.xstat_count);
--
2.51.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-10-28 11:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20251028101333.14776-1-cfontain@redhat.com>
2025-10-28 11:09 ` [PATCH v2] graph: fix xstats description allocation Christophe Fontaine
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).