Skip to content

Commit cdeb353

Browse files
christophefontainetmonjalo
authored andcommitted
graph: fix xstats description allocation
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: 070db97 ("graph: support node xstats") Cc: [email protected] Signed-off-by: Christophe Fontaine <[email protected]> Acked-by: Pavan Nikhilesh <[email protected]>
1 parent 874581d commit cdeb353

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/graph/graph_stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ stats_mem_populate(struct rte_graph_cluster_stats *stats,
302302
graph_node->node->name, graph->name);
303303

304304
cluster->stat.xstat_desc = rte_zmalloc_socket(NULL,
305-
sizeof(RTE_NODE_XSTAT_DESC_SIZE) * graph_node->node->xstats->nb_xstats,
305+
RTE_NODE_XSTAT_DESC_SIZE * graph_node->node->xstats->nb_xstats,
306306
RTE_CACHE_LINE_SIZE, stats->socket_id);
307307
if (cluster->stat.xstat_desc == NULL) {
308308
rte_free(cluster->stat.xstat_count);

0 commit comments

Comments
 (0)