patch 'net/nfp: fix set IPv4 flow action' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Sun Apr 9 17:23:48 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/d6fb8fc9c1378209e92e0d7b04012787c0dd671d

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From d6fb8fc9c1378209e92e0d7b04012787c0dd671d Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he at corigine.com>
Date: Tue, 21 Feb 2023 18:35:09 +0800
Subject: [PATCH] net/nfp: fix set IPv4 flow action
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit d4b453c42989eb689392fccc7d4b0bc5e1499470 ]

The former logic of set IPv4 source/destination address flow action
don't consider the mask filed of control message passed to the firmware.
This caused the firmware skip the set action logic, and the offloaded
packets don't have the right IPv4 address as expected.

Fixes: ab80975b0a14 ("net/nfp: support IPv4 source flow action")
Fixes: f85c1e05bff3 ("net/nfp: support IPv4 destination flow action")

Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 51862d73d8..14c949d730 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -2121,10 +2121,13 @@ nfp_flow_action_set_ip(char *act_data,
 	set_ip->reserved     = 0;
 
 	set_ipv4 = (const struct rte_flow_action_set_ipv4 *)action->conf;
-	if (ip_src_flag)
+	if (ip_src_flag) {
 		set_ip->ipv4_src = set_ipv4->ipv4_addr;
-	else
+		set_ip->ipv4_src_mask = RTE_BE32(0xffffffff);
+	} else {
 		set_ip->ipv4_dst = set_ipv4->ipv4_addr;
+		set_ip->ipv4_dst_mask = RTE_BE32(0xffffffff);
+	}
 }
 
 static void
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:39.816181600 +0800
+++ 0040-net-nfp-fix-set-IPv4-flow-action.patch	2023-04-09 21:45:38.629042200 +0800
@@ -1 +1 @@
-From d4b453c42989eb689392fccc7d4b0bc5e1499470 Mon Sep 17 00:00:00 2001
+From d6fb8fc9c1378209e92e0d7b04012787c0dd671d Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit d4b453c42989eb689392fccc7d4b0bc5e1499470 ]
@@ -16 +18,0 @@
-Cc: stable at dpdk.org
@@ -25 +27 @@
-index f373171d7e..39493ce98d 100644
+index 51862d73d8..14c949d730 100644
@@ -28 +30 @@
-@@ -2132,10 +2132,13 @@ nfp_flow_action_set_ip(char *act_data,
+@@ -2121,10 +2121,13 @@ nfp_flow_action_set_ip(char *act_data,


More information about the stable mailing list