octeontx2-pf: Tc flower offload support for MPLS
Subsystems (4)
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.
Signed-off-by Hariprasad Kelam <[email protected]>
Signed-off-by Sunil Goutham <[email protected]>
---
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
@@ -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
@@ -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
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.
Signed-off-by Hariprasad Kelam <[email protected]>Signed-off-by Sunil Goutham <[email protected]>---
v2 * instead of magic number0xffffff00use appropriate maskOTX2_FLOWER_MASK_MPLS_NON_TTL
Assuming this is for net-next, this looks good to me.
Reviewed-by Simon Horman <[email protected]>