From 557d5890823cdd423faac5711057a8d9ed5cd67d Mon Sep 17 00:00:00 2001 From: Alfredo Cardigliano Date: Fri, 3 Jan 2025 16:29:32 +0100 Subject: [PATCH] Add mac/vlan support to RSS --- .../intel/ice/ice-1.12.7-zc/src/ice_ethtool.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/intel/ice/ice-1.12.7-zc/src/ice_ethtool.c b/drivers/intel/ice/ice-1.12.7-zc/src/ice_ethtool.c index 263a2c616..187c87153 100644 --- a/drivers/intel/ice/ice-1.12.7-zc/src/ice_ethtool.c +++ b/drivers/intel/ice/ice-1.12.7-zc/src/ice_ethtool.c @@ -3944,6 +3944,13 @@ static u32 ice_parse_hdrs(struct ethtool_rxnfc *nfc) return hdrs; } +#define ICE_FLOW_HASH_FLD_ETH_SA BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA) +#define ICE_FLOW_HASH_FLD_ETH_DA BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_DA) +#define ICE_FLOW_HASH_FLD_S_VLAN BIT_ULL(ICE_FLOW_FIELD_IDX_S_VLAN) +#define ICE_FLOW_HASH_FLD_C_VLAN BIT_ULL(ICE_FLOW_FIELD_IDX_C_VLAN) +#define ICE_FLOW_HASH_FLD_PPPOE_SESS_ID \ + BIT_ULL(ICE_FLOW_FIELD_IDX_PPPOE_SESS_ID) + #define ICE_FLOW_HASH_FLD_IPV4_SA BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) #define ICE_FLOW_HASH_FLD_IPV6_SA BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) #define ICE_FLOW_HASH_FLD_IPV4_DA BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) @@ -3968,6 +3975,16 @@ static u64 ice_parse_hash_flds(struct ethtool_rxnfc *nfc) { u64 hfld = ICE_HASH_INVALID; + if (nfc->data & RXH_L2DA) { + hfld |= ICE_FLOW_HASH_FLD_ETH_SA; /* Source MAC Addr */ + hfld |= ICE_FLOW_HASH_FLD_ETH_DA; /* Destination MAC Addr */ + } + + if (nfc->data & RXH_VLAN) { + hfld |= ICE_FLOW_HASH_FLD_S_VLAN; /* Source VLAN */ + hfld |= ICE_FLOW_HASH_FLD_C_VLAN; /* QinQ */ + } + if (nfc->data & RXH_IP_SRC || nfc->data & RXH_IP_DST) { switch (nfc->flow_type) { case TCP_V4_FLOW: