From c6353c575469adea5db093ac68aed0525062e7d7 Mon Sep 17 00:00:00 2001 From: Satheesh Paul Date: Thu, 17 Mar 2022 09:20:36 +0530 Subject: [PATCH] common/cnxk: fix QinQ ROC item mismatch 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 in ROC by treating QINQ as multiple VLAN pattern items for DPDK (as opposed to treating QINQ as separate pattern item). Fixes: b8ac8b089ce ("common/cnxk: support matching VLAN existence") Cc: stable@dpdk.org Signed-off-by: Satheesh Paul Acked-by: Jerin Jacob --- drivers/common/cnxk/roc_npc_parse.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c index 364a846963..1ce0dadfef 100644 --- a/drivers/common/cnxk/roc_npc_parse.c +++ b/drivers/common/cnxk/roc_npc_parse.c @@ -351,15 +351,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) -- 2.39.5