Skip to contentSkip to conversation

octeontx2-pf: Tc flower offload support for MPLS

PATCH In review Hariprasad Kelam 2 participants 2 messages Sep 21, 2023 – Sep 22, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 octeontx2-pf: Tc flower offload support for MPLS

This patch extends flower offload support for MPLS protocol. Due to hardware limitation, currently driver supports lse depth up to 4.

---
v2 * instead of magic number 0xffffff00 use appropriate mask
OTX2_FLOWER_MASK_MPLS_NON_TTL
v3 * correct the subject prefix

 .../net/ethernet/marvell/octeontx2/af/mbox.h  |  6 ++
 .../net/ethernet/marvell/octeontx2/af/npc.h   |  8 +++
 .../marvell/octeontx2/af/rvu_debugfs.c        | 53 ++++++++++++++++
 .../marvell/octeontx2/af/rvu_npc_fs.c         | 62 +++++++++++++++++++
 .../ethernet/marvell/octeontx2/nic/otx2_tc.c  | 58 +++++++++++++++++
 5 files changed, 187 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/mbox.h +6 -0
index c5bd7747fc0e..6845556581c3 100644
@@ -1473,6 +1473,12 @@ struct flow_msg {
 		u8 next_header;
 	};
 	__be16 vlan_itci;
+#define OTX2_FLOWER_MASK_MPLS_LB		GENMASK(31, 12)
+#define OTX2_FLOWER_MASK_MPLS_TC		GENMASK(11, 9)
+#define OTX2_FLOWER_MASK_MPLS_BOS		BIT(8)
+#define OTX2_FLOWER_MASK_MPLS_TTL		GENMASK(7, 0)
+#define OTX2_FLOWER_MASK_MPLS_NON_TTL		GENMASK(31, 8)
+	u32 mpls_lse[4];
 };
 
 struct npc_install_flow_req {
drivers/net/ethernet/marvell/octeontx2/af/npc.h +8 -0
index de9fbd98dfb7..ab3e39eef2eb 100644
@@ -206,6 +206,14 @@ enum key_fields {
 	NPC_SPORT_SCTP,
 	NPC_DPORT_SCTP,
 	NPC_IPSEC_SPI,
+	NPC_MPLS1_LBTCBOS,
+	NPC_MPLS1_TTL,
+	NPC_MPLS2_LBTCBOS,
+	NPC_MPLS2_TTL,
+	NPC_MPLS3_LBTCBOS,
+	NPC_MPLS3_TTL,
+	NPC_MPLS4_LBTCBOS,
+	NPC_MPLS4_TTL,
 	NPC_HEADER_FIELDS_MAX,
 	NPC_CHAN = NPC_HEADER_FIELDS_MAX, /* Valid when Rx */
 	NPC_PF_FUNC, /* Valid when Tx */
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c +53 -0

65 lines not on this page · raw message

drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c +62 -0

86 lines not on this page · raw message

drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c +58 -0

76 lines not on this page · raw message

--
2.17.1