Skip to contentSkip to conversation

ice: Add support for double vlan in switchdev

PATCH In review Martyna Szapar-Mudlaw 2 participants 2 messages Mar 26, 2022 – Jun 28, 2022

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

PATCH v3 1/1 ice: Add support for double vlan in switchdev

Enable support for adding TC rules with both C-tag and S-tag that can filter on the inner and outer VLAN in QinQ for basic packets (not tunneled cases).

v2: Rebased. No functional changes.
v3: Fixed indentation error. No functional changes.

---
 .../ethernet/intel/ice/ice_protocol_type.h    |   2 +
 drivers/net/ethernet/intel/ice/ice_switch.c   | 230 +++++++++++++++++-
 drivers/net/ethernet/intel/ice/ice_tc_lib.c   |  43 +++-
 drivers/net/ethernet/intel/ice/ice_tc_lib.h   |   2 +
 4 files changed, 275 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/ice/ice_protocol_type.h +2 -0
index 3f64300b0e14..f8bd0990641b 100644
@@ -43,6 +43,8 @@ enum ice_protocol_type {
 	ICE_NVGRE,
 	ICE_GTP,
 	ICE_GTP_NO_PAY,
+	ICE_VLAN_EX,
+	ICE_VLAN_IN,
 	ICE_VXLAN_GPE,
 	ICE_SCTP_IL,
 	ICE_PROTOCOL_LAST
drivers/net/ethernet/intel/ice/ice_switch.c +229 -1

268 lines not on this page · raw message

drivers/net/ethernet/intel/ice/ice_tc_lib.c +42 -1

72 lines not on this page · raw message

drivers/net/ethernet/intel/ice/ice_tc_lib.h +2 -0
index e25e958f4396..87acfe5b0e4d 100644
@@ -23,6 +23,7 @@
 #define ICE_TC_FLWR_FIELD_ENC_DST_MAC		BIT(16)
 #define ICE_TC_FLWR_FIELD_ETH_TYPE_ID		BIT(17)
 #define ICE_TC_FLWR_FIELD_ENC_OPTS		BIT(18)
+#define ICE_TC_FLWR_FIELD_CVLAN			BIT(19)
 
 #define ICE_TC_FLOWER_MASK_32   0xFFFFFFFF
 
@@ -81,6 +82,7 @@ struct ice_tc_flower_lyr_2_4_hdrs {
 	struct ice_tc_l2_hdr l2_key;
 	struct ice_tc_l2_hdr l2_mask;
 	struct ice_tc_vlan_hdr vlan_hdr;
+	struct ice_tc_vlan_hdr cvlan_hdr;
 	/* L3 (IPv4[6]) layer fields with their mask */
 	struct ice_tc_l3_hdr l3_key;
 	struct ice_tc_l3_hdr l3_mask;
Signature · 1 line
2.31.1
Tested-by on v3 1/1
#1 lore raw
Quoted 19 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Martyna Szapar-Mudlaw
Sent: Saturday, March 26, 2022 6:06 PM
To: [email protected]
Cc: Szapar-Mudlaw, Martyna <[email protected]>; Wiktor Pilarczyk <[email protected]>
Subject: [Intel-wired-lan] [PATCH v3 net-next] ice: Add support for double vlan in switchdev

Enable support for adding TC rules with both C-tag and S-tag that can filter on the inner and outer VLAN in QinQ for basic packets (not tunneled cases).

v2: Rebased. No functional changes.
v3: Fixed indentation error. No functional changes.

Quoted 7 lines

---

.../ethernet/intel/ice/ice_protocol_type.h    |   2 +
drivers/net/ethernet/intel/ice/ice_switch.c   | 230 +++++++++++++++++-
drivers/net/ethernet/intel/ice/ice_tc_lib.c   |  43 +++-
drivers/net/ethernet/intel/ice/ice_tc_lib.h   |   2 +
4 files changed, 275 insertions(+), 2 deletions(-)

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan