[1/2] common/cnxk: support PPPoE flow item type in ROC API

Message ID 20231214071759.411405-1-psatheesh@marvell.com (mailing list archive)
State Changes Requested, archived
Delegated to: Jerin Jacob
Headers
Series [1/2] common/cnxk: support PPPoE flow item type in ROC API |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Satheesh Paul Antonysamy Dec. 14, 2023, 7:17 a.m. UTC
  From: Satheesh Paul <psatheesh@marvell.com>

Added ROC API changes to parse RTE_FLOW_ITEM_TYPE_PPPOES
rte_flow item type.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/common/cnxk/roc_npc.h       | 1 +
 drivers/common/cnxk/roc_npc_parse.c | 5 +++++
 2 files changed, 6 insertions(+)
  

Patch

diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h
index 459fa33de9..cb59db2220 100644
--- a/drivers/common/cnxk/roc_npc.h
+++ b/drivers/common/cnxk/roc_npc.h
@@ -33,6 +33,7 @@  enum roc_npc_item_type {
 	ROC_NPC_ITEM_TYPE_VXLAN_GPE,
 	ROC_NPC_ITEM_TYPE_IPV6_EXT,
 	ROC_NPC_ITEM_TYPE_GRE_KEY,
+	ROC_NPC_ITEM_TYPE_PPPOES,
 	ROC_NPC_ITEM_TYPE_HIGIG2,
 	ROC_NPC_ITEM_TYPE_CPT_HDR,
 	ROC_NPC_ITEM_TYPE_L3_CUSTOM,
diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c
index ecd1b3e13b..9ceb707ebb 100644
--- a/drivers/common/cnxk/roc_npc_parse.c
+++ b/drivers/common/cnxk/roc_npc_parse.c
@@ -525,6 +525,11 @@  npc_parse_lb(struct npc_parse_state *pst)
 		info.len = pattern->size;
 		lt = NPC_LT_LB_STAG_QINQ;
 		lflags = NPC_F_STAG_CTAG;
+	} else if (pst->pattern->type == ROC_NPC_ITEM_TYPE_PPPOES) {
+		info.hw_mask = NULL;
+		info.len = pattern->size;
+		info.hw_hdr_len = 2;
+		lt = NPC_LT_LB_PPPOE;
 	} else if (pst->pattern->type == ROC_NPC_ITEM_TYPE_RAW) {
 		raw_spec = pst->pattern->spec;
 		if (raw_spec->relative)