[PATCH] test-flow-perf: fix the incorrect array length
Bing Zhao
bingz at nvidia.com
Mon Nov 17 08:28:58 CET 2025
The array used to save the flow rules pointer was allocated with an
incorrect length. 1 more rule space should be appended but not 1 byte.
Fixes: 070316d01d3e ("app/flow-perf: add multi-core rule insertion and deletion")
Cc: wisamm at nvidia.com
Signed-off-by: Bing Zhao <bingz at nvidia.com>
---
app/test-flow-perf/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index b2084b93dd..a8876acf1f 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -1487,7 +1487,7 @@ insert_flows(int port_id, uint8_t core_id, uint16_t dst_port_id)
global_actions[0] = FLOW_ITEM_MASK(RTE_FLOW_ACTION_TYPE_JUMP);
flows_list = rte_zmalloc("flows_list",
- (sizeof(struct rte_flow *) * rules_count_per_core) + 1, 0);
+ (sizeof(struct rte_flow *) * (rules_count_per_core + 1)), 0);
if (flows_list == NULL)
rte_exit(EXIT_FAILURE, "No Memory available!\n");
--
2.34.1
More information about the dev
mailing list