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....@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell...@intel.com>
Signed-off-by: Qi Zhang <qi.z.zh...@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 8 ++++++--
 drivers/net/ice/base/ice_flow.h | 5 +++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index abdf10b94..769fd2da7 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -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)
 
 /**
diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
index 2ec9bb022..3afd201c4 100644
--- a/drivers/net/ice/base/ice_flow.h
+++ b/drivers/net/ice/base/ice_flow.h
@@ -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 \
-- 
2.13.6

Reply via email to