net/ice/base: enable RSS with ether layer for PPPoE
authorQi Zhang <qi.z.zhang@intel.com>
Thu, 29 Aug 2019 02:36:53 +0000 (10:36 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:53 +0000 (15:00 +0200)
Add these two ptype(MAC_PPPOD_PAY and MAC_PPPOE_PAY) in outer mac
bitmap, so it can hash for outer mac.

Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ice/base/ice_flow.c
drivers/net/ice/base/ice_flow.h

index abdf10b..769fd2d 100644 (file)
@@ -143,7 +143,7 @@ struct ice_flow_field_info ice_flds_info[ICE_FLOW_FIELD_IDX_MAX] = {
 static const u32 ice_ptypes_mac_ofos[] = {
        0xFDC00CC6, 0xBFBF7F7E, 0xF7EFDFDF, 0xFEFDFDFB,
        0x03BF7F7E, 0x00000000, 0x00000000, 0x00000000,
-       0x000B0F0F, 0x00000000, 0x00000000, 0x00000000,
+       0x000B0F0F, 0x00003000, 0x00000000, 0x00000000,
        0x00000000, 0x00000000, 0x00000000, 0x00000000,
        0x00000000, 0x00000000, 0x00000000, 0x00000000,
        0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -1682,6 +1682,9 @@ ice_flow_add_fld_raw(struct ice_flow_seg_info *seg, u16 off, u8 len,
        seg->raws_cnt++;
 }
 
+#define ICE_FLOW_RSS_SEG_HDR_L2_MASKS \
+(ICE_FLOW_SEG_HDR_ETH | ICE_FLOW_SEG_HDR_VLAN)
+
 #define ICE_FLOW_RSS_SEG_HDR_L3_MASKS \
        (ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_PPPOE)
 
@@ -1692,7 +1695,8 @@ ice_flow_add_fld_raw(struct ice_flow_seg_info *seg, u16 off, u8 len,
 
 
 #define ICE_FLOW_RSS_SEG_HDR_VAL_MASKS \
-       (ICE_FLOW_RSS_SEG_HDR_L3_MASKS | \
+       (ICE_FLOW_RSS_SEG_HDR_L2_MASKS | \
+        ICE_FLOW_RSS_SEG_HDR_L3_MASKS | \
         ICE_FLOW_RSS_SEG_HDR_L4_MASKS)
 
 /**
index 2ec9bb0..3afd201 100644 (file)
@@ -15,6 +15,9 @@
 #define ICE_FLOW_FLD_OFF_INVAL         0xffff
 
 /* Generate flow hash field from flow field type(s) */
+#define ICE_FLOW_HASH_ETH      \
+       (BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_DA) | \
+        BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA))
 #define ICE_FLOW_HASH_IPV4     \
        (BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | \
         BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA))
@@ -58,6 +61,8 @@
 #define ICE_FLOW_HASH_PPPOE_SESS_ID \
        (BIT_ULL(ICE_FLOW_FIELD_IDX_PPPOE_SESS_ID))
 
+#define ICE_FLOW_HASH_PPPOE_SESS_ID_ETH \
+       (ICE_FLOW_HASH_ETH | ICE_FLOW_HASH_PPPOE_SESS_ID)
 #define ICE_FLOW_HASH_PPPOE_TCP_ID \
        (ICE_FLOW_HASH_TCP_PORT | ICE_FLOW_HASH_PPPOE_SESS_ID)
 #define ICE_FLOW_HASH_PPPOE_UDP_ID \