DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bulatov Mark <ms.bulatov7@gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>,
	Long Wu <long.wu@corigine.com>,
	Chaoyong He <chaoyong.he@corigine.com>,
	Peng Zhang <peng.zhang@corigine.com>
Cc: dev@dpdk.org, stable@dpdk.org,
	Bulatov Mark <ms.bulatov7@gmail.com>,
	Alexey Simakov <bigalex934@gmail.com>
Subject: [PATCH] net/nfp: fix bad copy paste in nfp_net_flow_merge_ipv6
Date: Wed, 11 Nov 2026 19:55:15 +0300	[thread overview]
Message-ID: <20261111165515.6157-1-ms.bulatov7@gmail.com> (raw)

The nfp_net_flow_merge_ipv6() function contains two blocks: the first
iterates over ipv6->src_ipv6_mask, and the second over ipv6->src_ipv6.
However, in the first block, ipv6->src_ipv6 is passed as an argument
to sizeof() instead of ipv6->src_ipv6_mask.

Fixing this by replacing ipv6->src_ipv6 with ipv6->src_ipv6_mask.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 9f27cb8892 ("net/nfp: support IPv6 flow item")
Cc: stable@dpdk.org

Signed-off-by: Alexey Simakov <bigalex934@gmail.com>
Signed-off-by: Mark Bulatov <ms.bulatov7@gmail.com>
---
 .mailmap                       | 1 +
 drivers/net/nfp/nfp_net_flow.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 9db000bb6b..6177ca8b1e 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1057,6 +1057,7 @@ Mariusz Drost <mariuszx.drost@intel.com>
 Mark Asselstine <mark.asselstine@windriver.com>
 Mark Blasko <blasko@google.com>
 Mark Bloch <mbloch@nvidia.com> <markb@mellanox.com>
+Mark Bulatov <ms.bulatov7@gmail.com>
 Mark Gillott <mgillott@vyatta.att-mail.com>
 Mark Kavanagh <mark.b.kavanagh@intel.com>
 Mark Smith <marsmith@akamai.com>
diff --git a/drivers/net/nfp/nfp_net_flow.c b/drivers/net/nfp/nfp_net_flow.c
index 0e5003ebe3..80b4db1f4f 100644
--- a/drivers/net/nfp/nfp_net_flow.c
+++ b/drivers/net/nfp/nfp_net_flow.c
@@ -296,7 +296,7 @@ nfp_net_flow_merge_ipv6(struct rte_flow *nfp_flow,
 	ipv6 = (struct nfp_net_cmsg_match_v6 *)nfp_flow->payload.match_data;
 
 	ipv6->l4_protocol_mask = mask->hdr.proto;
-	for (i = 0; i < sizeof(ipv6->src_ipv6); i += 4) {
+	for (i = 0; i < sizeof(ipv6->src_ipv6_mask); i += 4) {
 		ipv6->src_ipv6_mask[i] = mask->hdr.src_addr.a[i + 3];
 		ipv6->src_ipv6_mask[i + 1] = mask->hdr.src_addr.a[i + 2];
 		ipv6->src_ipv6_mask[i + 2] = mask->hdr.src_addr.a[i + 1];
-- 
2.39.5


                 reply	other threads:[~2026-11-12  8:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261111165515.6157-1-ms.bulatov7@gmail.com \
    --to=ms.bulatov7@gmail.com \
    --cc=bigalex934@gmail.com \
    --cc=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=long.wu@corigine.com \
    --cc=peng.zhang@corigine.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /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