DPDK patches and discussions
 help / color / mirror / Atom feed
From: Steve Yang <stevex.yang@intel.com>
To: dev@dpdk.org
Cc: qiming.yang@intel.com, qi.z.zhang@intel.com,
	Steve Yang <stevex.yang@intel.com>
Subject: [PATCH v1] net/ice/base: backport FDIR support to 20.11
Date: Thu, 25 Aug 2022 07:43:14 +0000	[thread overview]
Message-ID: <20220825074314.16169-1-stevex.yang@intel.com> (raw)

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


                 reply	other threads:[~2022-08-25  7:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220825074314.16169-1-stevex.yang@intel.com \
    --to=stevex.yang@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).