[v1] net/ice/base: backport FDIR support to 20.11
Checks
Commit Message
Add new protocol ID IPV6_NETX_PROTO support for FDIR and RSS,
and always include proto or next header for l3 only RSS case.
The feature depends on the specific ICE DDP packet.
Signed-off-by: Steve Yang <stevex.yang@intel.com>
---
drivers/net/ice/base/ice_flow.c | 6 +++++-
drivers/net/ice/base/ice_flow.h | 6 ++++--
drivers/net/ice/base/ice_protocol_type.h | 1 +
3 files changed, 10 insertions(+), 3 deletions(-)
@@ -1100,7 +1100,7 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params,
break;
case ICE_FLOW_FIELD_IDX_IPV6_TTL:
case ICE_FLOW_FIELD_IDX_IPV6_PROT:
- prot_id = seg == 0 ? ICE_PROT_IPV6_OF_OR_S : ICE_PROT_IPV6_IL;
+ prot_id = seg == 0 ? ICE_PROT_IPV6_NEXT_PROTO : ICE_PROT_IPV6_IL;
/* TTL and PROT share the same extraction seq. entry.
* Each is considered a sibling to the other in terms of sharing
@@ -1207,6 +1207,10 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params,
flds[fld].xtrct.idx = params->es_cnt;
flds[fld].xtrct.mask = ice_flds_info[fld].mask;
+ if (prot_id == ICE_PROT_IPV6_NEXT_PROTO) {
+ flds[fld].xtrct.off = 0;
+ flds[fld].xtrct.disp = 0;
+ }
/* Adjust the next field-entry index after accommodating the number of
* entries this field consumes
*/
@@ -22,10 +22,12 @@
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))
+ BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA) | \
+ BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_PROT))
#define ICE_FLOW_HASH_IPV6 \
(BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_SA) | \
- BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA))
+ BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_DA) | \
+ BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PROT))
#define ICE_FLOW_HASH_IPV6_PRE32 \
(BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_SA) | \
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV6_PRE32_DA))
@@ -138,6 +138,7 @@ enum ice_prot_id {
ICE_PROT_IPV4_IL = 33,
ICE_PROT_IPV6_OF_OR_S = 40,
ICE_PROT_IPV6_IL = 41,
+ ICE_PROT_IPV6_NEXT_PROTO = 43,
ICE_PROT_IPV6_FRAG = 47,
ICE_PROT_TCP_IL = 49,
ICE_PROT_UDP_OF = 52,