summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_protocol_type.h
diff options
context:
space:
mode:
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>2021-10-12 11:31:05 -0700
committerTony Nguyen <anthony.l.nguyen@intel.com>2021-10-28 11:00:20 -0700
commit8b032a55c1bd5d47527263445aba9dc45144b00d (patch)
treed2832345d69f044bfb3731f16005c414fce159ef /drivers/net/ethernet/intel/ice/ice_protocol_type.h
parent9e300987d4a81fb95c323f042dd5aa484f4eb3dd (diff)
ice: low level support for tunnels
Add definition of UDP tunnel dummy packets. Fill destination port value in filter based on UDP tunnel port. Append tunnel flags to switch filter definition in case of matching the tunnel. Both VXLAN and Geneve are UDP tunnels, so only one new header is needed. Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_protocol_type.h')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_protocol_type.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_protocol_type.h b/drivers/net/ethernet/intel/ice/ice_protocol_type.h
index d717d1158545..8309ecaa771c 100644
--- a/drivers/net/ethernet/intel/ice/ice_protocol_type.h
+++ b/drivers/net/ethernet/intel/ice/ice_protocol_type.h
@@ -48,6 +48,7 @@ enum ice_sw_tunnel_type {
ICE_NON_TUN = 0,
ICE_SW_TUN_VXLAN,
ICE_SW_TUN_GENEVE,
+ ICE_ALL_TUNNELS /* All tunnel types */
};
/* Decoders for ice_prot_id:
@@ -83,6 +84,8 @@ enum ice_prot_id {
ICE_PROT_INVALID = 255 /* when offset == ICE_FV_OFFSET_INVAL */
};
+#define ICE_VNI_OFFSET 12 /* offset of VNI from ICE_PROT_UDP_OF */
+
#define ICE_MAC_OFOS_HW 1
#define ICE_MAC_IL_HW 4
#define ICE_ETYPE_OL_HW 9
@@ -96,6 +99,12 @@ enum ice_prot_id {
#define ICE_UDP_ILOS_HW 53
#define ICE_UDP_OF_HW 52 /* UDP Tunnels */
+#define ICE_META_DATA_ID_HW 255 /* this is used for tunnel type */
+
+#define ICE_MDID_SIZE 2
+#define ICE_TUN_FLAG_MDID 21
+#define ICE_TUN_FLAG_MDID_OFF (ICE_MDID_SIZE * ICE_TUN_FLAG_MDID)
+#define ICE_TUN_FLAG_MASK 0xFF
#define ICE_TUN_FLAG_FV_IND 2