[2/2] common/cnxk: fix QINQ ROC item mismatch issue

Message ID 20220317035036.2290272-2-psatheesh@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [1/2] common/cnxk: fix ROC naming convention issues |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-broadcom-Functional fail Functional Testing issues

Commit Message

Satheesh Paul Antonysamy March 17, 2022, 3:50 a.m. UTC
  From: Satheesh Paul <psatheesh@marvell.com>

ROC code is assuming presence of vlan extension headers in
case of QINQ, because of this, there is incompatibility
between the driver and ROC. Fixed this issue.

Fixes: 4edf1246a40 ("common/cnxk: support matching VLAN existence in RTE Flow")
Cc: stable@dpdk.org

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
---
 drivers/common/cnxk/roc_npc_parse.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
  

Patch

diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index b849326a19..757bff29a7 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -337,15 +337,10 @@  npc_parse_lb(struct npc_parse_state *pst)
 		}
 		info.len = pattern->size;
 	} else if (pst->pattern->type == ROC_NPC_ITEM_TYPE_QINQ) {
-		vlan_item[0] = pst->pattern->spec;
 		info.hw_mask = NULL;
-		info.len = sizeof(vlan_item[0]->hdr);
+		info.len = pattern->size;
 		lt = NPC_LT_LB_STAG_QINQ;
 		lflags = NPC_F_STAG_CTAG;
-		if (vlan_item[0] && vlan_item[0]->has_more_vlan) {
-			lflags = NPC_F_LB_L_WITH_QINQ_CTAG &
-				 NPC_F_LB_L_WITH_QINQ_QINQ;
-		}
 	} else if (pst->pattern->type == ROC_NPC_ITEM_TYPE_RAW) {
 		raw_spec = pst->pattern->spec;
 		if (raw_spec->relative)