Skip to contentSkip to conversation

octeontx2-pf: Tc flower offload support for MPLS

PATCH Superseded Hariprasad Kelam 2 participants 2 messages Sep 19, 2023 – Sep 21, 2023

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 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

 .../net/ethernet/marvell/octeontx2/af/mbox.h  |  6 ++
 .../net/ethernet/marvell/octeontx2/af/npc.h   |  8 +++
 .../marvell/octeontx2/af/rvu_debugfs.c        | 52 ++++++++++++++++++
 .../marvell/octeontx2/af/rvu_npc_fs.c         | 46 ++++++++++++++++
 .../ethernet/marvell/octeontx2/nic/otx2_tc.c  | 55 +++++++++++++++++++
 5 files changed, 167 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 +52 -0

64 lines not on this page · raw message

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

70 lines not on this page · raw message

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

73 lines not on this page · raw message

--
2.17.1

reviewer Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Hariprasad Kelam

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

Assuming this is for net-next, this looks good to me.