Skip to contentSkip to conversation

test-flow-perf: fix the incorrect array length

PATCH Applied Bing Zhao 4 participants 4 messages Nov 17, 2025 – Nov 18, 2025

lore
Share & tools
lore

Bing Zhao

author
#0 lore raw

PATCH 1/1 test-flow-perf: fix the incorrect array length

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")
---
 app/test-flow-perf/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-flow-perf/main.c +1 -1
index b2084b93dd..a8876acf1f 100644
@@ -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");
 
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#2 lore raw
In reply to Bing Zhao

Hi,

Quoted 11 lines

-----Original Message-----
From: Bing Zhao <[email protected]>
Sent: Monday, November 17, 2025 9:29 AM
To: Slava Ovsiienko <[email protected]>; [email protected]; Raslan Darawsheh <[email protected]>
Cc: Ori Kam <[email protected]>; Dariusz Sosnowski <[email protected]>; Suanming Mou <[email protected]>; Matan Azrad <[email protected]>; NBU-Contact-Thomas Monjalon (EXTERNAL) <[email protected]>; Wisam Jaddo <[email protected]>
Subject: [PATCH] test-flow-perf: fix the incorrect array length

Quoted 6 lines

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: [email protected]

BRs,
Wisam Jaddo

#3 lore raw
Quoted 8 lines
Quoted 6 lines

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: [email protected]

Applied, thanks.