DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] test-flow-perf: fix the incorrect array length
@ 2025-11-17  7:28 Bing Zhao
  2025-11-17 12:02 ` Dariusz Sosnowski
  2025-11-18 12:39 ` Wisam Jaddo
  0 siblings, 2 replies; 4+ messages in thread
From: Bing Zhao @ 2025-11-17  7:28 UTC (permalink / raw)
  To: viacheslavo, dev, rasland
  Cc: orika, dsosnowski, suanmingm, matan, thomas, wisamm

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@nvidia.com

Signed-off-by: Bing Zhao <bingz@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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] test-flow-perf: fix the incorrect array length
  2025-11-17  7:28 [PATCH] test-flow-perf: fix the incorrect array length Bing Zhao
@ 2025-11-17 12:02 ` Dariusz Sosnowski
  2025-11-18 12:39 ` Wisam Jaddo
  1 sibling, 0 replies; 4+ messages in thread
From: Dariusz Sosnowski @ 2025-11-17 12:02 UTC (permalink / raw)
  To: Bing Zhao
  Cc: viacheslavo, dev, rasland, orika, suanmingm, matan, thomas, wisamm

On Mon, Nov 17, 2025 at 09:28:58AM +0200, Bing Zhao wrote:
> 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@nvidia.com
> 
> Signed-off-by: Bing Zhao <bingz@nvidia.com>

Looks good to me.

Reviewed-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

Best regards,
Dariusz Sosnowski

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] test-flow-perf: fix the incorrect array length
  2025-11-17  7:28 [PATCH] test-flow-perf: fix the incorrect array length Bing Zhao
  2025-11-17 12:02 ` Dariusz Sosnowski
@ 2025-11-18 12:39 ` Wisam Jaddo
  2025-11-18 17:00   ` Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: Wisam Jaddo @ 2025-11-18 12:39 UTC (permalink / raw)
  To: Bing Zhao, Slava Ovsiienko, dev, Raslan Darawsheh
  Cc: Ori Kam, Dariusz Sosnowski, Suanming Mou, Matan Azrad,
	NBU-Contact-Thomas Monjalon (EXTERNAL)

Hi,


> -----Original Message-----
> From: Bing Zhao <bingz@nvidia.com>
> Sent: Monday, November 17, 2025 9:29 AM
> To: Slava Ovsiienko <viacheslavo@nvidia.com>; dev@dpdk.org; Raslan
> Darawsheh <rasland@nvidia.com>
> Cc: Ori Kam <orika@nvidia.com>; Dariusz Sosnowski
> <dsosnowski@nvidia.com>; Suanming Mou <suanmingm@nvidia.com>;
> Matan Azrad <matan@nvidia.com>; NBU-Contact-Thomas Monjalon
> (EXTERNAL) <thomas@monjalon.net>; Wisam Jaddo <wisamm@nvidia.com>
> Subject: [PATCH] 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")
> Cc: wisamm@nvidia.com

Acked-by: Wisam Jaddo <wisamm@nvidia.com>


BRs,
Wisam Jaddo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] test-flow-perf: fix the incorrect array length
  2025-11-18 12:39 ` Wisam Jaddo
@ 2025-11-18 17:00   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2025-11-18 17:00 UTC (permalink / raw)
  To: Bing Zhao
  Cc: Slava Ovsiienko, dev, Raslan Darawsheh, Ori Kam,
	Dariusz Sosnowski, Suanming Mou, Matan Azrad, Wisam Jaddo

> > 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@nvidia.com
> 
> Acked-by: Wisam Jaddo <wisamm@nvidia.com>

Applied, thanks.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-11-18 17:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-17  7:28 [PATCH] test-flow-perf: fix the incorrect array length Bing Zhao
2025-11-17 12:02 ` Dariusz Sosnowski
2025-11-18 12:39 ` Wisam Jaddo
2025-11-18 17:00   ` Thomas Monjalon

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).