net/i40e: fix IPv6 fragment RSS offload type in flow

Message ID 20211012083932.1428-1-alvinx.zhang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series net/i40e: fix IPv6 fragment RSS offload type in flow |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot: build success github build: passed
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Alvin Zhang Oct. 12, 2021, 8:39 a.m. UTC
  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(+)
  

Comments

Jiang, YuX Oct. 15, 2021, 9:36 a.m. UTC | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Alvin Zhang
> Sent: Tuesday, October 12, 2021 4:40 PM
> To: Xing, Beilei <beilei.xing@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/i40e: fix IPv6 fragment RSS offload type in
> flow
> 
> 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>
Tested-by: Yu Jiang <YuX.Jiang@intel.com>
  
Qi Zhang Oct. 15, 2021, 1:45 p.m. UTC | #2
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Jiang, YuX
> Sent: Friday, October 15, 2021 5:37 PM
> To: Zhang, AlvinX <alvinx.zhang@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Guo, Junfeng <junfeng.guo@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix IPv6 fragment RSS offload type in
> flow
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Alvin Zhang
> > Sent: Tuesday, October 12, 2021 4:40 PM
> > To: Xing, Beilei <beilei.xing@intel.com>; Guo, Junfeng
> > <junfeng.guo@intel.com>
> > Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>;
> > stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH] net/i40e: fix IPv6 fragment RSS offload
> > type in flow
> >
> > 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>
> Tested-by: Yu Jiang <YuX.Jiang@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  
Ferruh Yigit Oct. 15, 2021, 8:50 p.m. UTC | #3
On 10/12/2021 9:39 AM, Alvin Zhang wrote:
> 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>

'./devtools/check-doc-vs-code.sh' script is failing [1], can you please
fix it?

[1]
$ ./devtools/check-doc-vs-code.sh
rte_flow doc out of sync for i40e
         item ipv6_frag_ext
  
Qi Zhang Oct. 19, 2021, 12:03 a.m. UTC | #4
> -----Original Message-----
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Saturday, October 16, 2021 4:50 AM
> To: Zhang, AlvinX <alvinx.zhang@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; Guo, Junfeng <junfeng.guo@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: Re: [dpdk-stable] [PATCH] net/i40e: fix IPv6 fragment RSS offload type
> in flow
> 
> On 10/12/2021 9:39 AM, Alvin Zhang wrote:
> > 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>
> 
> './devtools/check-doc-vs-code.sh' script is failing [1], can you please fix it?
> 
> [1]
> $ ./devtools/check-doc-vs-code.sh
> rte_flow doc out of sync for i40e
>          item ipv6_frag_ext


Fixed in dpdk-next-net-intel.

Thanks
Qi
  
Alvin Zhang Oct. 19, 2021, 1:31 a.m. UTC | #5
> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Tuesday, October 19, 2021 8:03 AM
> To: Yigit, Ferruh <ferruh.yigit@intel.com>; Zhang, AlvinX
> <alvinx.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [dpdk-stable] [PATCH] net/i40e: fix IPv6 fragment RSS offload type in
> flow
> 
> 
> 
> > -----Original Message-----
> > From: Yigit, Ferruh <ferruh.yigit@intel.com>
> > Sent: Saturday, October 16, 2021 4:50 AM
> > To: Zhang, AlvinX <alvinx.zhang@intel.com>; Xing, Beilei
> > <beilei.xing@intel.com>; Guo, Junfeng <junfeng.guo@intel.com>
> > Cc: dev@dpdk.org; stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> > Subject: Re: [dpdk-stable] [PATCH] net/i40e: fix IPv6 fragment RSS
> > offload type in flow
> >
> > On 10/12/2021 9:39 AM, Alvin Zhang wrote:
> > > 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>
> >
> > './devtools/check-doc-vs-code.sh' script is failing [1], can you please fix it?
> >
> > [1]
> > $ ./devtools/check-doc-vs-code.sh
> > rte_flow doc out of sync for i40e
> >          item ipv6_frag_ext
> 
> 
> Fixed in dpdk-next-net-intel.
> 
> Thanks
> Qi

Hi Qi,

I have found a issue for this patch, the pattern supported in ice is:
eth / ipv6 / ipv6_frag_ext

not
eth / ipv6_frag_ext

I will submit V2 today.
  
Qi Zhang Oct. 19, 2021, 1:51 a.m. UTC | #6
> -----Original Message-----
> From: Zhang, AlvinX <alvinx.zhang@intel.com>
> Sent: Tuesday, October 19, 2021 9:32 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>;
> Xing, Beilei <beilei.xing@intel.com>; Guo, Junfeng <junfeng.guo@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [dpdk-stable] [PATCH] net/i40e: fix IPv6 fragment RSS offload type
> in flow
> 
> > -----Original Message-----
> > From: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Sent: Tuesday, October 19, 2021 8:03 AM
> > To: Yigit, Ferruh <ferruh.yigit@intel.com>; Zhang, AlvinX
> > <alvinx.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Guo,
> > Junfeng <junfeng.guo@intel.com>
> > Cc: dev@dpdk.org; stable@dpdk.org
> > Subject: RE: [dpdk-stable] [PATCH] net/i40e: fix IPv6 fragment RSS
> > offload type in flow
> >
> >
> >
> > > -----Original Message-----
> > > From: Yigit, Ferruh <ferruh.yigit@intel.com>
> > > Sent: Saturday, October 16, 2021 4:50 AM
> > > To: Zhang, AlvinX <alvinx.zhang@intel.com>; Xing, Beilei
> > > <beilei.xing@intel.com>; Guo, Junfeng <junfeng.guo@intel.com>
> > > Cc: dev@dpdk.org; stable@dpdk.org; Zhang, Qi Z
> > > <qi.z.zhang@intel.com>
> > > Subject: Re: [dpdk-stable] [PATCH] net/i40e: fix IPv6 fragment RSS
> > > offload type in flow
> > >
> > > On 10/12/2021 9:39 AM, Alvin Zhang wrote:
> > > > 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>
> > >
> > > './devtools/check-doc-vs-code.sh' script is failing [1], can you please fix it?
> > >
> > > [1]
> > > $ ./devtools/check-doc-vs-code.sh
> > > rte_flow doc out of sync for i40e
> > >          item ipv6_frag_ext
> >
> >
> > Fixed in dpdk-next-net-intel.
> >
> > Thanks
> > Qi
> 
> Hi Qi,
> 
> I have found a issue for this patch, the pattern supported in ice is:
> eth / ipv6 / ipv6_frag_ext
> 
> not
> eth / ipv6_frag_ext
> 
> I will submit V2 today.
> 
Ok, patch has been dropped from dpdk-next-net-intel.
  

Patch

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,