patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Alvin Zhang <alvinx.zhang@intel.com>
To: beilei.xing@intel.com, junfeng.guo@intel.com
Cc: dev@dpdk.org, Alvin Zhang <alvinx.zhang@intel.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH] net/i40e: fix IPv6 fragment RSS offload type in flow
Date: Tue, 12 Oct 2021 16:39:32 +0800	[thread overview]
Message-ID: <20211012083932.1428-1-alvinx.zhang@intel.com> (raw)

To keep flow format uniform with ice, this patch adds support for
this RSS rule:
    flow create 0 ingress pattern eth / ipv6_frag_ext / end actions \
    rss types ipv6-frag end queues end queues end / end

Fixes: ef4c16fd9148 ("net/i40e: refactor RSS flow")
Cc: stable@dpdk.org

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
 drivers/net/i40e/i40e_hash.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/i40e/i40e_hash.c b/drivers/net/i40e/i40e_hash.c
index 6579b1a..508a2cf 100644
--- a/drivers/net/i40e/i40e_hash.c
+++ b/drivers/net/i40e/i40e_hash.c
@@ -28,6 +28,7 @@
 #define I40E_HASH_HDR_ETH		0x01ULL
 #define I40E_HASH_HDR_IPV4		0x10ULL
 #define I40E_HASH_HDR_IPV6		0x20ULL
+#define I40E_HASH_HDR_IPV6_FRAG		0x40ULL
 #define I40E_HASH_HDR_TCP		0x100ULL
 #define I40E_HASH_HDR_UDP		0x200ULL
 #define I40E_HASH_HDR_SCTP		0x400ULL
@@ -54,6 +55,8 @@
 
 /* IPv6 */
 #define I40E_PHINT_IPV6			(I40E_HASH_HDR_ETH | I40E_HASH_HDR_IPV6)
+#define I40E_PHINT_IPV6_FRAG		(I40E_HASH_HDR_ETH | \
+					 I40E_HASH_HDR_IPV6_FRAG)
 #define I40E_PHINT_IPV6_TCP		(I40E_PHINT_IPV6 | I40E_HASH_HDR_TCP)
 #define I40E_PHINT_IPV6_UDP		(I40E_PHINT_IPV6 | I40E_HASH_HDR_UDP)
 #define I40E_PHINT_IPV6_SCTP		(I40E_PHINT_IPV6 | I40E_HASH_HDR_SCTP)
@@ -149,6 +152,7 @@ struct i40e_hash_map_rss_inset {
 
 #define I40E_HASH_ETH_NEXT_ALLOW	(BIT_ULL(RTE_FLOW_ITEM_TYPE_IPV4) | \
 					BIT_ULL(RTE_FLOW_ITEM_TYPE_IPV6) | \
+					BIT_ULL(RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT) | \
 					BIT_ULL(RTE_FLOW_ITEM_TYPE_VLAN))
 
 #define I40E_HASH_IP_NEXT_ALLOW		(BIT_ULL(RTE_FLOW_ITEM_TYPE_TCP) | \
@@ -177,6 +181,7 @@ struct i40e_hash_map_rss_inset {
 	[RTE_FLOW_ITEM_TYPE_ETH] = I40E_HASH_HDR_ETH,
 	[RTE_FLOW_ITEM_TYPE_IPV4] = I40E_HASH_HDR_IPV4,
 	[RTE_FLOW_ITEM_TYPE_IPV6] = I40E_HASH_HDR_IPV6,
+	[RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT] = I40E_HASH_HDR_IPV6_FRAG,
 	[RTE_FLOW_ITEM_TYPE_TCP] = I40E_HASH_HDR_TCP,
 	[RTE_FLOW_ITEM_TYPE_UDP] = I40E_HASH_HDR_UDP,
 	[RTE_FLOW_ITEM_TYPE_SCTP] = I40E_HASH_HDR_SCTP,
@@ -270,6 +275,10 @@ struct i40e_hash_match_pattern {
 			      I40E_HASH_IPV6_L23_RSS_MASK,
 			      I40E_FILTER_PCTYPE_NONF_IPV6_OTHER),
 
+	I40E_HASH_MAP_PATTERN(I40E_PHINT_IPV6_FRAG,
+			      ETH_RSS_FRAG_IPV6 | I40E_HASH_L23_RSS_MASK,
+			      I40E_FILTER_PCTYPE_FRAG_IPV6),
+
 	I40E_HASH_MAP_PATTERN(I40E_PHINT_IPV6_TCP,
 			      ETH_RSS_NONFRAG_IPV6_TCP |
 			      I40E_HASH_IPV6_L234_RSS_MASK,
-- 
1.8.3.1


             reply	other threads:[~2021-10-12  8:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12  8:39 Alvin Zhang [this message]
2021-10-15  9:36 ` [dpdk-stable] [dpdk-dev] " Jiang, YuX
2021-10-15 13:45   ` Zhang, Qi Z
2021-10-15 20:50 ` [dpdk-stable] " Ferruh Yigit
2021-10-19  0:03   ` Zhang, Qi Z
2021-10-19  1:31     ` Zhang, AlvinX
2021-10-19  1:51       ` Zhang, Qi Z
2021-10-19  1:53 ` [dpdk-stable] [PATCH v2] " Alvin Zhang
2021-10-19 11:05   ` Zhang, Qi Z

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=20211012083932.1428-1-alvinx.zhang@intel.com \
    --to=alvinx.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=junfeng.guo@intel.com \
    --cc=stable@dpdk.org \
    /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).