patch 'common/cnxk: fix VLAN check for inner header' has been queued to stable release 22.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 7 02:31:51 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/09/24. 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://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3294358b40031d4b4ba9eaf78f78c414b7cd8df1

Thanks.

Luca Boccassi

---
>From 3294358b40031d4b4ba9eaf78f78c414b7cd8df1 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra at marvell.com>
Date: Thu, 21 Dec 2023 12:08:11 +0530
Subject: [PATCH] common/cnxk: fix VLAN check for inner header

[ upstream commit 4f52aafa5901e653e536eb3126b818d78d7be1bc ]

Adding the has vlan check in inner headers i.e in LF layer. If
has_vlan is 0 it should be masked out while installing flow rule.

Fixes: c34ea71b878d ("common/cnxk: add NPC parsing API")

Signed-off-by: Harman Kalra <hkalra at marvell.com>
---
 drivers/common/cnxk/roc_npc_parse.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index e695b755d7..ce66d2a7d8 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -1019,6 +1019,7 @@ npc_parse_lf(struct npc_parse_state *pst)
 {
 	const struct roc_npc_item_info *pattern, *last_pattern;
 	char hw_mask[NPC_MAX_EXTRACT_HW_LEN];
+	const struct roc_npc_flow_item_eth *eth_item;
 	struct npc_parse_item_info info;
 	int lid, lt, lflags;
 	int nr_vlans = 0;
@@ -1035,10 +1036,12 @@ npc_parse_lf(struct npc_parse_state *pst)
 	lt = NPC_LT_LF_TU_ETHER;
 	lflags = 0;
 
+	eth_item = pst->pattern->spec;
+
 	/* No match support for vlan tags */
 	info.def_mask = NULL;
 	info.hw_mask = NULL;
-	info.len = pst->pattern->size;
+	info.len = sizeof(eth_item->hdr);
 	info.spec = NULL;
 	info.mask = NULL;
 	info.hw_hdr_len = 0;
@@ -1069,12 +1072,15 @@ npc_parse_lf(struct npc_parse_state *pst)
 	}
 
 	info.hw_mask = &hw_mask;
-	info.len = pst->pattern->size;
+	info.len = sizeof(eth_item->hdr);
 	info.hw_hdr_len = 0;
 	npc_get_hw_supp_mask(pst, &info, lid, lt);
 	info.spec = NULL;
 	info.mask = NULL;
 
+	if (eth_item && eth_item->has_vlan)
+		pst->set_vlan_ltype_mask = true;
+
 	rc = npc_parse_item_basic(pst->pattern, &info);
 	if (rc != 0)
 		return rc;
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:42.682510098 +0000
+++ 0094-common-cnxk-fix-VLAN-check-for-inner-header.patch	2024-03-07 01:05:35.002944346 +0000
@@ -1 +1 @@
-From 4f52aafa5901e653e536eb3126b818d78d7be1bc Mon Sep 17 00:00:00 2001
+From 3294358b40031d4b4ba9eaf78f78c414b7cd8df1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4f52aafa5901e653e536eb3126b818d78d7be1bc ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index 9ceb707ebb..571d6b8e5d 100644
+index e695b755d7..ce66d2a7d8 100644
@@ -21 +22 @@
-@@ -1097,6 +1097,7 @@ npc_parse_lf(struct npc_parse_state *pst)
+@@ -1019,6 +1019,7 @@ npc_parse_lf(struct npc_parse_state *pst)
@@ -29 +30 @@
-@@ -1113,10 +1114,12 @@ npc_parse_lf(struct npc_parse_state *pst)
+@@ -1035,10 +1036,12 @@ npc_parse_lf(struct npc_parse_state *pst)
@@ -43 +44 @@
-@@ -1147,12 +1150,15 @@ npc_parse_lf(struct npc_parse_state *pst)
+@@ -1069,12 +1072,15 @@ npc_parse_lf(struct npc_parse_state *pst)


More information about the stable mailing list