* [PATCH v1] net/ice/base: backport FDIR support to 20.11
@ 2022-08-25 7:43 Steve Yang
0 siblings, 0 replies; only message in thread
From: Steve Yang @ 2022-08-25 7:43 UTC (permalink / raw)
To: dev; +Cc: qiming.yang, qi.z.zhang, Steve Yang
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(-)
diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index c75f58659c..39acd35093 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -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
*/
diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
index 2a9ae66454..6c8644db1c 100644
--- a/drivers/net/ice/base/ice_flow.h
+++ b/drivers/net/ice/base/ice_flow.h
@@ -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))
diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h
index 8e0557b212..4935938f76 100644
--- a/drivers/net/ice/base/ice_protocol_type.h
+++ b/drivers/net/ice/base/ice_protocol_type.h
@@ -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,
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-25 7:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 7:43 [PATCH v1] net/ice/base: backport FDIR support to 20.11 Steve Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).