net/ice/base: add dedicate MAC type for E810
[dpdk.git] / drivers / net / ice / base / ice_flow.h
index 3afd201..4c2067f 100644 (file)
 #define ICE_FLOW_HASH_GTP_U_IPV6_TEID \
        (ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_GTP_U_TEID)
 
+#define ICE_FLOW_HASH_GTP_U_EH_TEID \
+       (BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_EH_TEID))
+
+#define ICE_FLOW_HASH_GTP_U_EH_QFI \
+       (BIT_ULL(ICE_FLOW_FIELD_IDX_GTPU_EH_QFI))
+
+#define ICE_FLOW_HASH_GTP_U_IPV4_EH \
+       (ICE_FLOW_HASH_IPV4 | ICE_FLOW_HASH_GTP_U_EH_TEID | \
+        ICE_FLOW_HASH_GTP_U_EH_QFI)
+#define ICE_FLOW_HASH_GTP_U_IPV6_EH \
+       (ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_GTP_U_EH_TEID | \
+        ICE_FLOW_HASH_GTP_U_EH_QFI)
+
 #define ICE_FLOW_HASH_PPPOE_SESS_ID \
        (BIT_ULL(ICE_FLOW_FIELD_IDX_PPPOE_SESS_ID))
 
@@ -89,9 +102,10 @@ enum ice_flow_seg_hdr {
        ICE_FLOW_SEG_HDR_GTPC           = 0x00000400,
        ICE_FLOW_SEG_HDR_GTPC_TEID      = 0x00000800,
        ICE_FLOW_SEG_HDR_GTPU_IP        = 0x00001000,
-       ICE_FLOW_SEG_HDR_GTPU_DWN       = 0x00002000,
-       ICE_FLOW_SEG_HDR_GTPU_UP        = 0x00004000,
-       ICE_FLOW_SEG_HDR_PPPOE          = 0x00008000,
+       ICE_FLOW_SEG_HDR_GTPU_EH        = 0x00002000,
+       ICE_FLOW_SEG_HDR_GTPU_DWN       = 0x00004000,
+       ICE_FLOW_SEG_HDR_GTPU_UP        = 0x00008000,
+       ICE_FLOW_SEG_HDR_PPPOE          = 0x00010000,
 };
 
 /* These segements all have the same PTYPES, but are otherwise distinguished by
@@ -99,6 +113,7 @@ enum ice_flow_seg_hdr {
  *
  *                                gtp_eh_pdu     gtp_eh_pdu_link
  * ICE_FLOW_SEG_HDR_GTPU_IP           0              0
+ * ICE_FLOW_SEG_HDR_GTPU_EH           1              don't care
  * ICE_FLOW_SEG_HDR_GTPU_DWN          1              0
  * ICE_FLOW_SEG_HDR_GTPU_UP           1              1
  */
@@ -114,9 +129,12 @@ enum ice_flow_field {
        ICE_FLOW_FIELD_IDX_C_VLAN,
        ICE_FLOW_FIELD_IDX_ETH_TYPE,
        /* L3 */
-       ICE_FLOW_FIELD_IDX_IP_DSCP,
-       ICE_FLOW_FIELD_IDX_IP_TTL,
-       ICE_FLOW_FIELD_IDX_IP_PROT,
+       ICE_FLOW_FIELD_IDX_IPV4_DSCP,
+       ICE_FLOW_FIELD_IDX_IPV6_DSCP,
+       ICE_FLOW_FIELD_IDX_IPV4_TTL,
+       ICE_FLOW_FIELD_IDX_IPV4_PROT,
+       ICE_FLOW_FIELD_IDX_IPV6_TTL,
+       ICE_FLOW_FIELD_IDX_IPV6_PROT,
        ICE_FLOW_FIELD_IDX_IPV4_SA,
        ICE_FLOW_FIELD_IDX_IPV4_DA,
        ICE_FLOW_FIELD_IDX_IPV6_SA,
@@ -144,6 +162,9 @@ enum ice_flow_field {
        ICE_FLOW_FIELD_IDX_GTPC_TEID,
        /* GTPU_IP */
        ICE_FLOW_FIELD_IDX_GTPU_IP_TEID,
+       /* GTPU_EH */
+       ICE_FLOW_FIELD_IDX_GTPU_EH_TEID,
+       ICE_FLOW_FIELD_IDX_GTPU_EH_QFI,
        /* GTPU_UP */
        ICE_FLOW_FIELD_IDX_GTPU_UP_TEID,
        /* GTPU_DWN */
@@ -166,6 +187,7 @@ enum ice_flow_avf_hdr_field {
        ICE_AVF_FLOW_FIELD_IPV4_SCTP,
        ICE_AVF_FLOW_FIELD_IPV4_OTHER,
        ICE_AVF_FLOW_FIELD_FRAG_IPV4,
+       /* Values 37-38 are reserved */
        ICE_AVF_FLOW_FIELD_UNICAST_IPV6_UDP     = 39,
        ICE_AVF_FLOW_FIELD_MULTICAST_IPV6_UDP,
        ICE_AVF_FLOW_FIELD_IPV6_UDP,
@@ -232,6 +254,7 @@ struct ice_flow_seg_xtrct {
        u16 off;        /* Starting offset of the field in header in bytes */
        u8 idx;         /* Index of FV entry used */
        u8 disp;        /* Displacement of field in bits fr. FV entry's start */
+       u16 mask;       /* Mask for field */
 };
 
 enum ice_flow_fld_match_type {
@@ -260,8 +283,8 @@ struct ice_flow_fld_info {
 };
 
 struct ice_flow_seg_fld_raw {
-       int off;        /* Offset from the start of the segment */
        struct ice_flow_fld_info info;
+       u16 off;        /* Offset from the start of the segment */
 };
 
 struct ice_flow_seg_info {
@@ -315,6 +338,8 @@ struct ice_flow_prof {
                /* struct sw_recipe */
                /* struct fd */
                u32 data;
+               /* Symmetric Hash for RSS */
+               bool symm;
        } cfg;
 
        /* Default actions */
@@ -327,6 +352,7 @@ struct ice_rss_cfg {
        ice_declare_bitmap(vsis, ICE_MAX_VSI);
        u64 hashed_flds;
        u32 packet_hdr;
+       bool symm;
 };
 
 enum ice_flow_action_type {
@@ -359,9 +385,6 @@ struct ice_flow_action {
        } data;
 };
 
-/* TDD esp in the linux code doesn't like prototypes, so
- * ifdef them all out, so they stop conflicting with our mocks
- */
 u64
 ice_flow_find_prof(struct ice_hw *hw, enum ice_block blk, enum ice_flow_dir dir,
                   struct ice_flow_seg_info *segs, u8 segs_cnt);
@@ -402,7 +425,7 @@ ice_add_avf_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds);
 enum ice_status ice_rem_vsi_rss_cfg(struct ice_hw *hw, u16 vsi_handle);
 enum ice_status
 ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
-               u32 addl_hdrs);
+               u32 addl_hdrs, bool symm);
 enum ice_status
 ice_rem_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
                u32 addl_hdrs);