net/ice/base: backport FDIR support to 20.11
PATCH 1/1 net/ice/base: backport FDIR support to 20.11
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 <[email protected]>
--- 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(-)
drivers/net/ice/base/ice_flow.c +5 -1
@@ -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 */
drivers/net/ice/base/ice_flow.h +4 -2
@@ -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))
drivers/net/ice/base/ice_protocol_type.h +1 -0
@@ -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,
Signature · 1 line
2.25.1