common/cnxk: fix GRE tunnel parsing
authorSatheesh Paul <psatheesh@marvell.com>
Thu, 23 Jun 2022 03:42:04 +0000 (09:12 +0530)
committerJerin Jacob <jerinj@marvell.com>
Mon, 4 Jul 2022 12:46:46 +0000 (14:46 +0200)
After parsing GRE tunnel, parse subsequent protocols
(for example, TCP or UDP) as tunneled versions.

Fixes: c34ea71b878 ("common/cnxk: add NPC parsing API")
Cc: stable@dpdk.org
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
drivers/common/cnxk/roc_npc_parse.c

index 0748646..ff00c74 100644 (file)
@@ -699,11 +699,13 @@ npc_parse_ld(struct npc_parse_state *pst)
        case ROC_NPC_ITEM_TYPE_GRE:
                lt = NPC_LT_LD_GRE;
                info.len = pst->pattern->size;
+               pst->tunnel = 1;
                break;
        case ROC_NPC_ITEM_TYPE_GRE_KEY:
                lt = NPC_LT_LD_GRE;
                info.len = pst->pattern->size;
                info.hw_hdr_len = 4;
+               pst->tunnel = 1;
                break;
        case ROC_NPC_ITEM_TYPE_NVGRE:
                lt = NPC_LT_LD_NVGRE;