test-flow-perf: fix the incorrect array length
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.
--- app/test-flow-perf/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-flow-perf/main.c +1 -1
@@ -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
Quoted 7 lines · Bing Zhao
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")Signed-off-by Bing Zhao <[email protected]>
Looks good to me.
Best regards,
Dariusz Sosnowski
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 anddeletion")
Cc: [email protected]
BRs,
Wisam Jaddo
Thomas Monjalon
AppliedQuoted 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 anddeletion")
Cc: [email protected]Acked-by Wisam Jaddo <[email protected]>
Applied, thanks.