DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/octeontx2: move ESP parsing to LE layer
@ 2020-08-27 11:40 kirankumark
  2020-09-29 17:56 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: kirankumark @ 2020-08-27 11:40 UTC (permalink / raw)
  To: Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K; +Cc: dev

From: Kiran Kumar K <kirankumark@marvell.com>

Add support to parse NAT-T-ESP by moving the ESP parsing
to LE.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/common/octeontx2/hw/otx2_npc.h  |  2 +-
 drivers/net/octeontx2/otx2_flow_parse.c | 10 +++++-----
 drivers/net/octeontx2/otx2_lookup.c     |  6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/common/octeontx2/hw/otx2_npc.h b/drivers/common/octeontx2/hw/otx2_npc.h
index efde1e214..45e60dfd5 100644
--- a/drivers/common/octeontx2/hw/otx2_npc.h
+++ b/drivers/common/octeontx2/hw/otx2_npc.h
@@ -225,7 +225,6 @@ enum npc_kpu_ld_ltype {
 	NPC_LT_LD_SCTP,
 	NPC_LT_LD_ICMP6,
 	NPC_LT_LD_IGMP = 8,
-	NPC_LT_LD_ESP,
 	NPC_LT_LD_AH,
 	NPC_LT_LD_GRE,
 	NPC_LT_LD_NVGRE,
@@ -237,6 +236,7 @@ enum npc_kpu_ld_ltype {
 enum npc_kpu_le_ltype {
 	NPC_LT_LE_VXLAN = 1,
 	NPC_LT_LE_GENEVE,
+	NPC_LT_LE_ESP,
 	NPC_LT_LE_GTPU = 4,
 	NPC_LT_LE_VXLANGPE,
 	NPC_LT_LE_GTPC,
diff --git a/drivers/net/octeontx2/otx2_flow_parse.c b/drivers/net/octeontx2/otx2_flow_parse.c
index 2d9a5857c..e918574df 100644
--- a/drivers/net/octeontx2/otx2_flow_parse.c
+++ b/drivers/net/octeontx2/otx2_flow_parse.c
@@ -245,6 +245,11 @@ otx2_flow_parse_le(struct otx2_parse_state *pst)
 		info.len = sizeof(struct rte_flow_item_vxlan);
 		lt = NPC_LT_LE_VXLAN;
 		break;
+	case RTE_FLOW_ITEM_TYPE_ESP:
+		lt = NPC_LT_LE_ESP;
+		info.def_mask = &rte_flow_item_esp_mask;
+		info.len = sizeof(struct rte_flow_item_esp);
+		break;
 	case RTE_FLOW_ITEM_TYPE_GTPC:
 		lflags = NPC_F_UDP_GTP_GTPC;
 		info.def_mask = &rte_flow_item_gtp_mask;
@@ -441,11 +446,6 @@ otx2_flow_parse_ld(struct otx2_parse_state *pst)
 		info.def_mask = &rte_flow_item_sctp_mask;
 		info.len = sizeof(struct rte_flow_item_sctp);
 		break;
-	case RTE_FLOW_ITEM_TYPE_ESP:
-		lt = NPC_LT_LD_ESP;
-		info.def_mask = &rte_flow_item_esp_mask;
-		info.len = sizeof(struct rte_flow_item_esp);
-		break;
 	case RTE_FLOW_ITEM_TYPE_GRE:
 		lt = NPC_LT_LD_GRE;
 		info.def_mask = &rte_flow_item_gre_mask;
diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c
index 10944bc17..14ea1cf79 100644
--- a/drivers/net/octeontx2/otx2_lookup.c
+++ b/drivers/net/octeontx2/otx2_lookup.c
@@ -169,15 +169,15 @@ nix_create_non_tunnel_ptype_array(uint16_t *ptype)
 		case NPC_LT_LD_NVGRE:
 			val |= RTE_PTYPE_TUNNEL_NVGRE;
 			break;
-		case NPC_LT_LD_ESP:
-			val |= RTE_PTYPE_TUNNEL_ESP;
-			break;
 		}
 
 		switch (le) {
 		case NPC_LT_LE_VXLAN:
 			val |= RTE_PTYPE_TUNNEL_VXLAN;
 			break;
+		case NPC_LT_LE_ESP:
+			val |= RTE_PTYPE_TUNNEL_ESP;
+			break;
 		case NPC_LT_LE_VXLANGPE:
 			val |= RTE_PTYPE_TUNNEL_VXLAN_GPE;
 			break;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-29 17:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 11:40 [dpdk-dev] [PATCH] net/octeontx2: move ESP parsing to LE layer kirankumark
2020-09-29 17:56 ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).