From: Bing Zhao <bingz@nvidia.com>
To: <viacheslavo@nvidia.com>, <dev@dpdk.org>, <rasland@nvidia.com>
Cc: <orika@nvidia.com>, <dsosnowski@nvidia.com>,
<suanmingm@nvidia.com>, <matan@nvidia.com>, <thomas@monjalon.net>,
<wisamm@nvidia.com>
Subject: [PATCH] test-flow-perf: fix the incorrect array length
Date: Mon, 17 Nov 2025 09:28:58 +0200 [thread overview]
Message-ID: <20251117072858.9318-1-bingz@nvidia.com> (raw)
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
next reply other threads:[~2025-11-17 7:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 7:28 Bing Zhao [this message]
2025-11-17 12:02 ` Dariusz Sosnowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251117072858.9318-1-bingz@nvidia.com \
--to=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=suanmingm@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.com \
--cc=wisamm@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).