DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/iavf: fix negative GTP-U flow rules create successfully
@ 2020-12-09  7:14 Murphy Yang
  2020-12-18  6:18 ` [dpdk-dev] [PATCH v2] " Murphy Yang
  0 siblings, 1 reply; 13+ messages in thread
From: Murphy Yang @ 2020-12-09  7:14 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, stevex.yang, jingjing.wu, beilei.xing, Murphy Yang

Currently, when use 'flow' command to create a negative GTP-U rule, it
will be created successfully.

The list shows the impacted outer and inner 'ipv4' GTP-U patterns with
'ipv4' or 'gtpu' type:
 - iavf_pattern_eth_ipv4_gtpu_ipv4_udp
 - iavf_pattern_eth_ipv4_gtpu_eh_ipv4_udp
 - iavf_pattern_eth_ipv4_gtpu_ipv4_tcp
 - iavf_pattern_eth_ipv4_gtpu_eh_ipv4_tcp
 - more impacted patterns with 'gtpu' type:
   > iavf_pattern_eth_ipv4_gtpu_ipv4
   > iavf_pattern_eth_ipv4_gtpu_eh_ipv4

Same as the outer and inner 'ipv6' GTP-U patterns.

So, this commit modifies the macro define of the 'IAVF_RSS_TYPE_XXX' to
make the result correct.

Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 30 ++++++++++--------------------
 1 file changed, 10 insertions(+), 20 deletions(-)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index c4c73e6644..7a3ea39d66 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -326,34 +326,24 @@ struct virtchnl_proto_hdrs ipv6_udp_gtpc_tmplt = {
 					 ETH_RSS_S_VLAN | ETH_RSS_C_VLAN)
 /* IPv4 inner */
 #define IAVF_RSS_TYPE_INNER_IPV4	ETH_RSS_IPV4
-#define IAVF_RSS_TYPE_INNER_IPV4_UDP	(ETH_RSS_IPV4 | \
-					 ETH_RSS_NONFRAG_IPV4_UDP)
-#define IAVF_RSS_TYPE_INNER_IPV4_TCP	(ETH_RSS_IPV4 | \
-					 ETH_RSS_NONFRAG_IPV4_TCP)
+#define IAVF_RSS_TYPE_INNER_IPV4_UDP	(ETH_RSS_NONFRAG_IPV4_UDP)
+#define IAVF_RSS_TYPE_INNER_IPV4_TCP	(ETH_RSS_NONFRAG_IPV4_TCP)
 #define IAVF_RSS_TYPE_INNER_IPV4_SCTP	(ETH_RSS_IPV4 | \
 					 ETH_RSS_NONFRAG_IPV4_SCTP)
 /* IPv6 inner */
 #define IAVF_RSS_TYPE_INNER_IPV6	ETH_RSS_IPV6
-#define IAVF_RSS_TYPE_INNER_IPV6_UDP	(ETH_RSS_IPV6 | \
-					 ETH_RSS_NONFRAG_IPV6_UDP)
-#define IAVF_RSS_TYPE_INNER_IPV6_TCP	(ETH_RSS_IPV6 | \
-					 ETH_RSS_NONFRAG_IPV6_TCP)
+#define IAVF_RSS_TYPE_INNER_IPV6_UDP	(ETH_RSS_NONFRAG_IPV6_UDP)
+#define IAVF_RSS_TYPE_INNER_IPV6_TCP	(ETH_RSS_NONFRAG_IPV6_TCP)
 #define IAVF_RSS_TYPE_INNER_IPV6_SCTP	(ETH_RSS_IPV6 | \
 					 ETH_RSS_NONFRAG_IPV6_SCTP)
 /* GTPU IPv4 */
-#define IAVF_RSS_TYPE_GTPU_IPV4		(IAVF_RSS_TYPE_INNER_IPV4 | \
-					 ETH_RSS_GTPU)
-#define IAVF_RSS_TYPE_GTPU_IPV4_UDP	(IAVF_RSS_TYPE_INNER_IPV4_UDP | \
-					 ETH_RSS_GTPU)
-#define IAVF_RSS_TYPE_GTPU_IPV4_TCP	(IAVF_RSS_TYPE_INNER_IPV4_TCP | \
-					 ETH_RSS_GTPU)
+#define IAVF_RSS_TYPE_GTPU_IPV4		(IAVF_RSS_TYPE_INNER_IPV4)
+#define IAVF_RSS_TYPE_GTPU_IPV4_UDP	(IAVF_RSS_TYPE_INNER_IPV4_UDP)
+#define IAVF_RSS_TYPE_GTPU_IPV4_TCP	(IAVF_RSS_TYPE_INNER_IPV4_TCP)
 /* GTPU IPv6 */
-#define IAVF_RSS_TYPE_GTPU_IPV6		(IAVF_RSS_TYPE_INNER_IPV6 | \
-					 ETH_RSS_GTPU)
-#define IAVF_RSS_TYPE_GTPU_IPV6_UDP	(IAVF_RSS_TYPE_INNER_IPV6_UDP | \
-					 ETH_RSS_GTPU)
-#define IAVF_RSS_TYPE_GTPU_IPV6_TCP	(IAVF_RSS_TYPE_INNER_IPV6_TCP | \
-					 ETH_RSS_GTPU)
+#define IAVF_RSS_TYPE_GTPU_IPV6		(IAVF_RSS_TYPE_INNER_IPV6)
+#define IAVF_RSS_TYPE_GTPU_IPV6_UDP	(IAVF_RSS_TYPE_INNER_IPV6_UDP)
+#define IAVF_RSS_TYPE_GTPU_IPV6_TCP	(IAVF_RSS_TYPE_INNER_IPV6_TCP)
 /* ESP, AH, L2TPV3 and PFCP */
 #define IAVF_RSS_TYPE_IPV4_ESP		(ETH_RSS_ESP | ETH_RSS_IPV4)
 #define IAVF_RSS_TYPE_IPV4_AH		(ETH_RSS_AH | ETH_RSS_IPV4)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v2] net/iavf: fix negative GTP-U flow rules create successfully
  2020-12-09  7:14 [dpdk-dev] [PATCH] net/iavf: fix negative GTP-U flow rules create successfully Murphy Yang
@ 2020-12-18  6:18 ` Murphy Yang
  2020-12-23  2:32   ` Guo, Jia
  2020-12-23  6:21   ` [dpdk-dev] [PATCH v3] net/iavf: fix invalid RSS combinations rule can be created Murphy Yang
  0 siblings, 2 replies; 13+ messages in thread
From: Murphy Yang @ 2020-12-18  6:18 UTC (permalink / raw)
  To: dev
  Cc: qiming.yang, stevex.yang, jia.guo, jingjing.wu, beilei.xing, Murphy Yang

Currently, when use 'flow' command to create a negative GTP-U rule, it
will be created successfully.

The list shows the impacted outer and inner 'ipv4' GTP-U patterns with
'ipv4' or 'gtpu' type:
 - iavf_pattern_eth_ipv4_gtpu_ipv4_udp
 - iavf_pattern_eth_ipv4_gtpu_eh_ipv4_udp
 - iavf_pattern_eth_ipv4_gtpu_ipv4_tcp
 - iavf_pattern_eth_ipv4_gtpu_eh_ipv4_tcp
 - more impacted patterns with 'gtpu' type:
   > iavf_pattern_eth_ipv4_gtpu_ipv4
   > iavf_pattern_eth_ipv4_gtpu_eh_ipv4

Same as the outer and inner 'ipv6' GTP-U patterns.

So, this commit adds the invalid RSS combinations in 'invalid_rss_comb'
array to make result correct.

The list of added invalid RSS combinations:
 - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
 - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP
 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4
 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_UDP
 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_TCP
 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6
 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_UDP
 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_TCP

Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
---
v2:
- add invalid RSS combinations

 drivers/net/iavf/iavf_hash.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index c4c73e6644..8393d8535b 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -806,7 +806,15 @@ static void iavf_refine_proto_hdrs(struct virtchnl_proto_hdrs *proto_hdrs,
 
 static uint64_t invalid_rss_comb[] = {
 	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
+	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
 	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
+	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
+	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4,
+	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_UDP,
+	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_TCP,
+	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6,
+	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_UDP,
+	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_TCP,
 	RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 |
 	RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 |
 	RTE_ETH_RSS_L3_PRE96
-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/iavf: fix negative GTP-U flow rules create successfully
  2020-12-18  6:18 ` [dpdk-dev] [PATCH v2] " Murphy Yang
@ 2020-12-23  2:32   ` Guo, Jia
  2020-12-23  6:21   ` [dpdk-dev] [PATCH v3] net/iavf: fix invalid RSS combinations rule can be created Murphy Yang
  1 sibling, 0 replies; 13+ messages in thread
From: Guo, Jia @ 2020-12-23  2:32 UTC (permalink / raw)
  To: Yang, MurphyX, dev
  Cc: Yang, Qiming, Yang, SteveX, Wu, Jingjing, Xing, Beilei, Yang, MurphyX

Hi, murphy

> -----Original Message-----
> From: Murphy Yang <murphyx.yang@intel.com>
> Sent: Friday, December 18, 2020 2:19 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Yang, SteveX
> <stevex.yang@intel.com>; Guo, Jia <jia.guo@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Yang,
> MurphyX <murphyx.yang@intel.com>
> Subject: [PATCH v2] net/iavf: fix negative GTP-U flow rules create
> successfully
> 
> Currently, when use 'flow' command to create a negative GTP-U rule, it will
> be created successfully.
> 
> The list shows the impacted outer and inner 'ipv4' GTP-U patterns with 'ipv4'
> or 'gtpu' type:
>  - iavf_pattern_eth_ipv4_gtpu_ipv4_udp
>  - iavf_pattern_eth_ipv4_gtpu_eh_ipv4_udp
>  - iavf_pattern_eth_ipv4_gtpu_ipv4_tcp
>  - iavf_pattern_eth_ipv4_gtpu_eh_ipv4_tcp
>  - more impacted patterns with 'gtpu' type:
>    > iavf_pattern_eth_ipv4_gtpu_ipv4
>    > iavf_pattern_eth_ipv4_gtpu_eh_ipv4
> 
> Same as the outer and inner 'ipv6' GTP-U patterns.
> 
> So, this commit adds the invalid RSS combinations in 'invalid_rss_comb'
> array to make result correct.
> 
> The list of added invalid RSS combinations:
>  - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
>  - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP
>  - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4
>  - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_UDP
>  - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_TCP
>  - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6
>  - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_UDP
>  - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_TCP
> 

Seem that you add some specific negative flow case for the "ipv4(outer/inner) + gtpu" and "ipv4(outer/inner) + ipv4-udp(tcp)"  in the currently invalid checking mode, so you commit log could be more clear and clean for that, thanks.  

> Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")
> 
> Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
> ---
> v2:
> - add invalid RSS combinations
> 
>  drivers/net/iavf/iavf_hash.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index
> c4c73e6644..8393d8535b 100644
> --- a/drivers/net/iavf/iavf_hash.c
> +++ b/drivers/net/iavf/iavf_hash.c
> @@ -806,7 +806,15 @@ static void iavf_refine_proto_hdrs(struct
> virtchnl_proto_hdrs *proto_hdrs,
> 
>  static uint64_t invalid_rss_comb[] = {
>  	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
> +	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
>  	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
> +	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
> +	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4,
> +	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_UDP,
> +	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_TCP,
> +	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6,
> +	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_UDP,
> +	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_TCP,

Shouldn't it be " ETH_RSS_GTPU | ETH_RSS_IPV4" if outer ip case is the same? Whatever you should considerate both if you check one.

>  	RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 |
>  	RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 |
>  	RTE_ETH_RSS_L3_PRE96
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v3] net/iavf: fix invalid RSS combinations rule can be created
  2020-12-18  6:18 ` [dpdk-dev] [PATCH v2] " Murphy Yang
  2020-12-23  2:32   ` Guo, Jia
@ 2020-12-23  6:21   ` Murphy Yang
  2020-12-23  8:03     ` [dpdk-dev] [PATCH v4] " Murphy Yang
  1 sibling, 1 reply; 13+ messages in thread
From: Murphy Yang @ 2020-12-23  6:21 UTC (permalink / raw)
  To: dev
  Cc: qiming.yang, jia.guo, qi.z.zhang, stevex.yang, jingjing.wu,
	beilei.xing, Murphy Yang

Currently, when use 'flow' command to create a rule that combine with
several RSS types, even the RSS type combination is invalid, it also
be created successfully.

Here list some invalid RSS combinations:
 - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
 - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP
 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4
 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_UDP
 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_TCP
 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6
 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_UDP
 - ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_TCP

So, this patch adds these combinations in 'invalid_rss_comb'
array to do valid check, if the combination check failed,
the rule will be created unsuccessful.

Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
---
v3:
- update the comments.
v2:
- add invalid RSS combinations.

 drivers/net/iavf/iavf_hash.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index c4c73e6644..8393d8535b 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -806,7 +806,15 @@ static void iavf_refine_proto_hdrs(struct virtchnl_proto_hdrs *proto_hdrs,
 
 static uint64_t invalid_rss_comb[] = {
 	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
+	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
 	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
+	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
+	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4,
+	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_UDP,
+	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV4_TCP,
+	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6,
+	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_UDP,
+	ETH_RSS_GTPU | IAVF_RSS_TYPE_INNER_IPV6_TCP,
 	RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 |
 	RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 |
 	RTE_ETH_RSS_L3_PRE96
-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v4] net/iavf: fix invalid RSS combinations rule can be created
  2020-12-23  6:21   ` [dpdk-dev] [PATCH v3] net/iavf: fix invalid RSS combinations rule can be created Murphy Yang
@ 2020-12-23  8:03     ` Murphy Yang
  2020-12-23  8:14       ` Guo, Jia
  2020-12-24  2:20       ` [dpdk-dev] [PATCH v5] " Murphy Yang
  0 siblings, 2 replies; 13+ messages in thread
From: Murphy Yang @ 2020-12-23  8:03 UTC (permalink / raw)
  To: dev
  Cc: qiming.yang, jia.guo, qi.z.zhang, stevex.yang, jingjing.wu,
	beilei.xing, Murphy Yang

Currently, when use 'flow' command to create a rule that combine with
several RSS types, even the RSS type combination is invalid, it also
be created successfully.

Here list some invalid RSS combinations:
 - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
 - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP
 - ETH_RSS_GTPU | ETH_RSS_IPV4
 - ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP
 - ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
 - ETH_RSS_GTPU | ETH_RSS_IPV6
 - ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP
 - ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP

So, this patch adds these combinations in 'invalid_rss_comb'
array to do valid check, if the combination check failed,
the rule will be created unsuccessful.

Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
---
v4:
- use 'ETH_RSS_XXX' replace 'IAVF_RSS_TYPE_INNER_XXX'
v3:
- update the comments.
v2:
- add invalid RSS combinations.

 drivers/net/iavf/iavf_hash.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index c4c73e6644..3ed72f6475 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -806,7 +806,15 @@ static void iavf_refine_proto_hdrs(struct virtchnl_proto_hdrs *proto_hdrs,
 
 static uint64_t invalid_rss_comb[] = {
 	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
+	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
 	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
+	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
+	ETH_RSS_GTPU | ETH_RSS_IPV4,
+	ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
+	ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
+	ETH_RSS_GTPU | ETH_RSS_IPV6,
+	ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
+	ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
 	RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 |
 	RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 |
 	RTE_ETH_RSS_L3_PRE96
-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v4] net/iavf: fix invalid RSS combinations rule can be created
  2020-12-23  8:03     ` [dpdk-dev] [PATCH v4] " Murphy Yang
@ 2020-12-23  8:14       ` Guo, Jia
  2020-12-24  2:20       ` [dpdk-dev] [PATCH v5] " Murphy Yang
  1 sibling, 0 replies; 13+ messages in thread
From: Guo, Jia @ 2020-12-23  8:14 UTC (permalink / raw)
  To: Yang, MurphyX, dev
  Cc: Yang, Qiming, Zhang, Qi Z, Yang, SteveX, Wu, Jingjing, Xing,
	Beilei, Yang, MurphyX

Acked-by: Jeff Guo <jia.guo@intel.com>

> -----Original Message-----
> From: Murphy Yang <murphyx.yang@intel.com>
> Sent: Wednesday, December 23, 2020 4:04 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Guo, Jia <jia.guo@intel.com>;
> Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>;
> Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> Yang, MurphyX <murphyx.yang@intel.com>
> Subject: [PATCH v4] net/iavf: fix invalid RSS combinations rule can be created
> 
> Currently, when use 'flow' command to create a rule that combine with
> several RSS types, even the RSS type combination is invalid, it also be created
> successfully.
> 
> Here list some invalid RSS combinations:
>  - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
>  - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP
>  - ETH_RSS_GTPU | ETH_RSS_IPV4
>  - ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP
>  - ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
>  - ETH_RSS_GTPU | ETH_RSS_IPV6
>  - ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP
>  - ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP
> 
> So, this patch adds these combinations in 'invalid_rss_comb'
> array to do valid check, if the combination check failed, the rule will be
> created unsuccessful.
> 
> Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")
> 
> Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
> ---
> v4:
> - use 'ETH_RSS_XXX' replace 'IAVF_RSS_TYPE_INNER_XXX'
> v3:
> - update the comments.
> v2:
> - add invalid RSS combinations.
> 
>  drivers/net/iavf/iavf_hash.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index
> c4c73e6644..3ed72f6475 100644
> --- a/drivers/net/iavf/iavf_hash.c
> +++ b/drivers/net/iavf/iavf_hash.c
> @@ -806,7 +806,15 @@ static void iavf_refine_proto_hdrs(struct
> virtchnl_proto_hdrs *proto_hdrs,
> 
>  static uint64_t invalid_rss_comb[] = {
>  	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
> +	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
>  	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
> +	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
> +	ETH_RSS_GTPU | ETH_RSS_IPV4,
> +	ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
> +	ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
> +	ETH_RSS_GTPU | ETH_RSS_IPV6,
> +	ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
> +	ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
>  	RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 |
>  	RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 |
>  	RTE_ETH_RSS_L3_PRE96
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v5] net/iavf: fix invalid RSS combinations rule can be created
  2020-12-23  8:03     ` [dpdk-dev] [PATCH v4] " Murphy Yang
  2020-12-23  8:14       ` Guo, Jia
@ 2020-12-24  2:20       ` Murphy Yang
  2020-12-28  2:28         ` [dpdk-dev] [PATCH v6] " Murphy Yang
  1 sibling, 1 reply; 13+ messages in thread
From: Murphy Yang @ 2020-12-24  2:20 UTC (permalink / raw)
  To: dev
  Cc: qiming.yang, jia.guo, qi.z.zhang, stevex.yang, jingjing.wu,
	beilei.xing, Murphy Yang

Currently, when use 'flow' command to create a rule that combine with
several RSS types, even the RSS type combination is invalid, it also
be created successfully.

Here list some invalid RSS combinations:
 - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
 - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP
 - ETH_RSS_GTPU | ETH_RSS_IPV4
 - ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP
 - ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
 - ETH_RSS_GTPU | ETH_RSS_IPV6
 - ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP
 - ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP

For 'ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP' (same as IPV6), this
pathch adds these combinations in 'invalid_rss_comb' array to do
valid check, if the combination check failed, the rule will be created
unsuccessful.

For other 'ETH_RSS_GTPU' invalid combinations, this patch removes
the 'ETH_RSS_GTPU' from the input set mask, if the combination is
invalid, the 'rss_type' check will be failed, the rule will be created
unsuccessful.

Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
---
v5:
- remove 'ETH_RSS_GTPU' from input set mask.
v4:
- use 'ETH_RSS_XXX' replace 'IAVF_RSS_TYPE_INNER_XXX'
v3:
- update the comments.
v2:
- add invalid RSS combinations.
 drivers/net/iavf/iavf_hash.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index c4c73e6644..916d6c5dfa 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -341,19 +341,13 @@ struct virtchnl_proto_hdrs ipv6_udp_gtpc_tmplt = {
 #define IAVF_RSS_TYPE_INNER_IPV6_SCTP	(ETH_RSS_IPV6 | \
 					 ETH_RSS_NONFRAG_IPV6_SCTP)
 /* GTPU IPv4 */
-#define IAVF_RSS_TYPE_GTPU_IPV4		(IAVF_RSS_TYPE_INNER_IPV4 | \
-					 ETH_RSS_GTPU)
-#define IAVF_RSS_TYPE_GTPU_IPV4_UDP	(IAVF_RSS_TYPE_INNER_IPV4_UDP | \
-					 ETH_RSS_GTPU)
-#define IAVF_RSS_TYPE_GTPU_IPV4_TCP	(IAVF_RSS_TYPE_INNER_IPV4_TCP | \
-					 ETH_RSS_GTPU)
+#define IAVF_RSS_TYPE_GTPU_IPV4		IAVF_RSS_TYPE_INNER_IPV4
+#define IAVF_RSS_TYPE_GTPU_IPV4_UDP	IAVF_RSS_TYPE_INNER_IPV4_UDP
+#define IAVF_RSS_TYPE_GTPU_IPV4_TCP	IAVF_RSS_TYPE_INNER_IPV4_TCP
 /* GTPU IPv6 */
-#define IAVF_RSS_TYPE_GTPU_IPV6		(IAVF_RSS_TYPE_INNER_IPV6 | \
-					 ETH_RSS_GTPU)
-#define IAVF_RSS_TYPE_GTPU_IPV6_UDP	(IAVF_RSS_TYPE_INNER_IPV6_UDP | \
-					 ETH_RSS_GTPU)
-#define IAVF_RSS_TYPE_GTPU_IPV6_TCP	(IAVF_RSS_TYPE_INNER_IPV6_TCP | \
-					 ETH_RSS_GTPU)
+#define IAVF_RSS_TYPE_GTPU_IPV6		IAVF_RSS_TYPE_INNER_IPV6
+#define IAVF_RSS_TYPE_GTPU_IPV6_UDP	IAVF_RSS_TYPE_INNER_IPV6_UDP
+#define IAVF_RSS_TYPE_GTPU_IPV6_TCP	IAVF_RSS_TYPE_INNER_IPV6_TCP
 /* ESP, AH, L2TPV3 and PFCP */
 #define IAVF_RSS_TYPE_IPV4_ESP		(ETH_RSS_ESP | ETH_RSS_IPV4)
 #define IAVF_RSS_TYPE_IPV4_AH		(ETH_RSS_AH | ETH_RSS_IPV4)
@@ -806,7 +800,9 @@ static void iavf_refine_proto_hdrs(struct virtchnl_proto_hdrs *proto_hdrs,
 
 static uint64_t invalid_rss_comb[] = {
 	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
+	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
 	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
+	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
 	RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 |
 	RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 |
 	RTE_ETH_RSS_L3_PRE96
-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v6] net/iavf: fix invalid RSS combinations rule can be created
  2020-12-24  2:20       ` [dpdk-dev] [PATCH v5] " Murphy Yang
@ 2020-12-28  2:28         ` Murphy Yang
  2021-01-07  7:58           ` [dpdk-dev] [PATCH v7] " Murphy Yang
  0 siblings, 1 reply; 13+ messages in thread
From: Murphy Yang @ 2020-12-28  2:28 UTC (permalink / raw)
  To: dev
  Cc: qiming.yang, jia.guo, qi.z.zhang, stevex.yang, jingjing.wu,
	beilei.xing, Murphy Yang

Currently, when use 'flow' command to create a rule that combine with
several RSS types, even the RSS type combination is invalid or unsupported,
it also be created successfully.

Here list some invalid RSS combinations:
 - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
 - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP

Here list some currently unsupported RSS combinations:
 - ETH_RSS_GTPU | ETH_RSS_IPV4
 - ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP
 - ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
 - ETH_RSS_GTPU | ETH_RSS_IPV6
 - ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP
 - ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP

For invalid RSS combinations, this
patch adds these combinations in 'invalid_rss_comb' array to do
valid check, if the combination check failed, the rule will be created
unsuccessful.

For unsupported RSS combinations, this patch adds these combinations in
'unsupported_rss_comb' array to do valid check, if the combination check
failed, the rule will be created unsuccessful.

Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
---
v6:
- add unsupported RSS combinations array.
v5:
- remove 'ETH_RSS_GTPU' from input set mask.
v4:
- use 'ETH_RSS_XXX' replace 'IAVF_RSS_TYPE_INNER_XXX'
v3:
- update the comments.
v2:
- add invalid RSS combinations.
 drivers/net/iavf/iavf_hash.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index c4c73e6644..0061eb6652 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -806,12 +806,23 @@ static void iavf_refine_proto_hdrs(struct virtchnl_proto_hdrs *proto_hdrs,
 
 static uint64_t invalid_rss_comb[] = {
 	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
+	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
 	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
+	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
 	RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 |
 	RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 |
 	RTE_ETH_RSS_L3_PRE96
 };
 
+static uint64_t unsupported_rss_comb[] = {
+	ETH_RSS_GTPU | ETH_RSS_IPV4,
+	ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
+	ETH_RSS_GTPU | ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
+	ETH_RSS_GTPU | ETH_RSS_IPV6,
+	ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
+	ETH_RSS_GTPU | ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP
+};
+
 struct rss_attr_type {
 	uint64_t attr;
 	uint64_t type;
@@ -875,6 +886,13 @@ iavf_any_invalid_rss_type(enum rte_eth_hash_function rss_func,
 			return true;
 	}
 
+	/* check unsupported rss combination */
+	for (i = 0; i < RTE_DIM(unsupported_rss_comb); i++) {
+		if (__builtin_popcountll(rss_type &
+				unsupported_rss_comb[i]) > 1)
+			return true;
+	}
+
 	/* check invalid RSS attribute */
 	for (i = 0; i < RTE_DIM(rss_attr_to_valid_type); i++) {
 		struct rss_attr_type *rat = &rss_attr_to_valid_type[i];
-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v7] net/iavf: fix invalid RSS combinations rule can be created
  2020-12-28  2:28         ` [dpdk-dev] [PATCH v6] " Murphy Yang
@ 2021-01-07  7:58           ` Murphy Yang
  2021-01-07  9:17             ` [dpdk-dev] [PATCH v8] " Murphy Yang
  0 siblings, 1 reply; 13+ messages in thread
From: Murphy Yang @ 2021-01-07  7:58 UTC (permalink / raw)
  To: dev
  Cc: qiming.yang, jia.guo, qi.z.zhang, stevex.yang, jingjing.wu,
	beilei.xing, Murphy Yang

Currently, when use 'flow' command to create a rule that combine with
several RSS types, even the RSS type combination is invalid, it also
be created successfully.

Here list some invalid RSS combinations:
 - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
 - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP

For 'ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP' (same as IPV6), this
pathch adds these combinations in 'invalid_rss_comb' array to do
valid check, if the combination check failed, the rule will be created
unsuccessful.

Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
---
v7:
- Remove unsupported RSS combinations array.
- Restored 'ETH_RSS_GTPU' in input set mask.
v6:
- Add unsupported RSS combinations array.
v5:
- Remove 'ETH_RSS_GTPU' from input set mask.
v4:
- Use 'ETH_RSS_XXX' replace 'IAVF_RSS_TYPE_INNER_XXX'
v3:
- Update the comments.
v2:
- Add invalid RSS combinations.
 drivers/net/iavf/iavf_hash.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 7620876b58..ebaac58254 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -863,7 +863,9 @@ static void iavf_refine_proto_hdrs(struct virtchnl_proto_hdrs *proto_hdrs,
 
 static uint64_t invalid_rss_comb[] = {
 	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
+	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
 	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
+	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
 	RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 |
 	RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 |
 	RTE_ETH_RSS_L3_PRE96
-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [dpdk-dev] [PATCH v8] net/iavf: fix invalid RSS combinations rule can be created
  2021-01-07  7:58           ` [dpdk-dev] [PATCH v7] " Murphy Yang
@ 2021-01-07  9:17             ` Murphy Yang
  2021-01-07  9:33               ` Guo, Jia
  2021-01-13  5:13               ` Huang, ZhiminX
  0 siblings, 2 replies; 13+ messages in thread
From: Murphy Yang @ 2021-01-07  9:17 UTC (permalink / raw)
  To: dev
  Cc: qiming.yang, jia.guo, qi.z.zhang, stevex.yang, jingjing.wu,
	beilei.xing, Murphy Yang

Currently, when use 'flow' command to create a rule with following invalid
RSS type combination, it can be created successfully.

Invalid RSS combinations list:
 - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
 - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP

This patch adds these combinations in 'invalid_rss_comb' array to do
valid check, if the combination check failed, the rule will be created
unsuccessful.

Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
---
v8:
- Update the comments.
v7:
- Remove unsupported RSS combinations array.
- Restored 'ETH_RSS_GTPU' in input set mask.
v6:
- Add unsupported RSS combinations array.
v5:
- Remove 'ETH_RSS_GTPU' from input set mask.
v4:
- Use 'ETH_RSS_XXX' replace 'IAVF_RSS_TYPE_INNER_XXX'
v3:
- Update the comments.
v2:
- Add invalid RSS combinations.
 drivers/net/iavf/iavf_hash.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 7620876b58..ebaac58254 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -863,7 +863,9 @@ static void iavf_refine_proto_hdrs(struct virtchnl_proto_hdrs *proto_hdrs,
 
 static uint64_t invalid_rss_comb[] = {
 	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
+	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
 	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
+	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
 	RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 |
 	RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 |
 	RTE_ETH_RSS_L3_PRE96
-- 
2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v8] net/iavf: fix invalid RSS combinations rule can be created
  2021-01-07  9:17             ` [dpdk-dev] [PATCH v8] " Murphy Yang
@ 2021-01-07  9:33               ` Guo, Jia
  2021-01-12  4:52                 ` Zhang, Qi Z
  2021-01-13  5:13               ` Huang, ZhiminX
  1 sibling, 1 reply; 13+ messages in thread
From: Guo, Jia @ 2021-01-07  9:33 UTC (permalink / raw)
  To: Yang, MurphyX, dev
  Cc: Yang, Qiming, Zhang, Qi Z, Yang, SteveX, Wu, Jingjing, Xing,
	Beilei, Yang, MurphyX

Acked-by: Jeff Guo <jia.guo@intel.com>

> -----Original Message-----
> From: Murphy Yang <murphyx.yang@intel.com>
> Sent: Thursday, January 7, 2021 5:17 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Guo, Jia <jia.guo@intel.com>;
> Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>;
> Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> Yang, MurphyX <murphyx.yang@intel.com>
> Subject: [PATCH v8] net/iavf: fix invalid RSS combinations rule can be created
> 
> Currently, when use 'flow' command to create a rule with following invalid
> RSS type combination, it can be created successfully.
> 
> Invalid RSS combinations list:
>  - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
>  - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP
> 
> This patch adds these combinations in 'invalid_rss_comb' array to do valid
> check, if the combination check failed, the rule will be created unsuccessful.
> 
> Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")
> 
> Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
> ---
> v8:
> - Update the comments.
> v7:
> - Remove unsupported RSS combinations array.
> - Restored 'ETH_RSS_GTPU' in input set mask.
> v6:
> - Add unsupported RSS combinations array.
> v5:
> - Remove 'ETH_RSS_GTPU' from input set mask.
> v4:
> - Use 'ETH_RSS_XXX' replace 'IAVF_RSS_TYPE_INNER_XXX'
> v3:
> - Update the comments.
> v2:
> - Add invalid RSS combinations.
>  drivers/net/iavf/iavf_hash.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index
> 7620876b58..ebaac58254 100644
> --- a/drivers/net/iavf/iavf_hash.c
> +++ b/drivers/net/iavf/iavf_hash.c
> @@ -863,7 +863,9 @@ static void iavf_refine_proto_hdrs(struct
> virtchnl_proto_hdrs *proto_hdrs,
> 
>  static uint64_t invalid_rss_comb[] = {
>  	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
> +	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
>  	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
> +	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
>  	RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 |
>  	RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 |
>  	RTE_ETH_RSS_L3_PRE96
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v8] net/iavf: fix invalid RSS combinations rule can be created
  2021-01-07  9:33               ` Guo, Jia
@ 2021-01-12  4:52                 ` Zhang, Qi Z
  0 siblings, 0 replies; 13+ messages in thread
From: Zhang, Qi Z @ 2021-01-12  4:52 UTC (permalink / raw)
  To: Guo, Jia, Yang, MurphyX, dev
  Cc: Yang, Qiming, Yang, SteveX, Wu, Jingjing, Xing, Beilei, Yang, MurphyX



> -----Original Message-----
> From: Guo, Jia <jia.guo@intel.com>
> Sent: Thursday, January 7, 2021 5:33 PM
> To: Yang, MurphyX <murphyx.yang@intel.com>; dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Yang, MurphyX
> <murphyx.yang@intel.com>
> Subject: RE: [PATCH v8] net/iavf: fix invalid RSS combinations rule can be
> created
> 
> Acked-by: Jeff Guo <jia.guo@intel.com>
> 
> > -----Original Message-----
> > From: Murphy Yang <murphyx.yang@intel.com>
> > Sent: Thursday, January 7, 2021 5:17 PM
> > To: dev@dpdk.org
> > Cc: Yang, Qiming <qiming.yang@intel.com>; Guo, Jia
> > <jia.guo@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, SteveX
> > <stevex.yang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Xing,
> > Beilei <beilei.xing@intel.com>; Yang, MurphyX <murphyx.yang@intel.com>
> > Subject: [PATCH v8] net/iavf: fix invalid RSS combinations rule can be
> > created
> >
> > Currently, when use 'flow' command to create a rule with following
> > invalid RSS type combination, it can be created successfully.
> >
> > Invalid RSS combinations list:
> >  - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
> >  - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP
> >
> > This patch adds these combinations in 'invalid_rss_comb' array to do
> > valid check, if the combination check failed, the rule will be created
> unsuccessful.
> >
> > Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")
> >
> > Signed-off-by: Murphy Yang <murphyx.yang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [dpdk-dev] [PATCH v8] net/iavf: fix invalid RSS combinations rule can be created
  2021-01-07  9:17             ` [dpdk-dev] [PATCH v8] " Murphy Yang
  2021-01-07  9:33               ` Guo, Jia
@ 2021-01-13  5:13               ` Huang, ZhiminX
  1 sibling, 0 replies; 13+ messages in thread
From: Huang, ZhiminX @ 2021-01-13  5:13 UTC (permalink / raw)
  To: Yang, MurphyX, dev
  Cc: Yang, Qiming, Guo, Jia, Zhang, Qi Z, Yang, SteveX, Wu, Jingjing,
	Xing, Beilei, Yang, MurphyX

Tested-by: Huang, ZhiminX <zhiminx.huang@intel.com>

Regards,
HuangZhiMin

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Murphy Yang
> Sent: Thursday, January 7, 2021 5:17 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Guo, Jia <jia.guo@intel.com>;
> Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>;
> Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> Yang, MurphyX <murphyx.yang@intel.com>
> Subject: [dpdk-dev] [PATCH v8] net/iavf: fix invalid RSS combinations rule can be
> created
> 
> Currently, when use 'flow' command to create a rule with following invalid RSS
> type combination, it can be created successfully.
> 
> Invalid RSS combinations list:
>  - ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP
>  - ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP
> 
> This patch adds these combinations in 'invalid_rss_comb' array to do valid
> check, if the combination check failed, the rule will be created unsuccessful.
> 
> Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")
> 
> Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
> ---
> v8:
> - Update the comments.
> v7:
> - Remove unsupported RSS combinations array.
> - Restored 'ETH_RSS_GTPU' in input set mask.
> v6:
> - Add unsupported RSS combinations array.
> v5:
> - Remove 'ETH_RSS_GTPU' from input set mask.
> v4:
> - Use 'ETH_RSS_XXX' replace 'IAVF_RSS_TYPE_INNER_XXX'
> v3:
> - Update the comments.
> v2:
> - Add invalid RSS combinations.
>  drivers/net/iavf/iavf_hash.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index
> 7620876b58..ebaac58254 100644
> --- a/drivers/net/iavf/iavf_hash.c
> +++ b/drivers/net/iavf/iavf_hash.c
> @@ -863,7 +863,9 @@ static void iavf_refine_proto_hdrs(struct
> virtchnl_proto_hdrs *proto_hdrs,
> 
>  static uint64_t invalid_rss_comb[] = {
>  	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_UDP,
> +	ETH_RSS_IPV4 | ETH_RSS_NONFRAG_IPV4_TCP,
>  	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_UDP,
> +	ETH_RSS_IPV6 | ETH_RSS_NONFRAG_IPV6_TCP,
>  	RTE_ETH_RSS_L3_PRE32 | RTE_ETH_RSS_L3_PRE40 |
>  	RTE_ETH_RSS_L3_PRE48 | RTE_ETH_RSS_L3_PRE56 |
>  	RTE_ETH_RSS_L3_PRE96
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-01-13  5:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09  7:14 [dpdk-dev] [PATCH] net/iavf: fix negative GTP-U flow rules create successfully Murphy Yang
2020-12-18  6:18 ` [dpdk-dev] [PATCH v2] " Murphy Yang
2020-12-23  2:32   ` Guo, Jia
2020-12-23  6:21   ` [dpdk-dev] [PATCH v3] net/iavf: fix invalid RSS combinations rule can be created Murphy Yang
2020-12-23  8:03     ` [dpdk-dev] [PATCH v4] " Murphy Yang
2020-12-23  8:14       ` Guo, Jia
2020-12-24  2:20       ` [dpdk-dev] [PATCH v5] " Murphy Yang
2020-12-28  2:28         ` [dpdk-dev] [PATCH v6] " Murphy Yang
2021-01-07  7:58           ` [dpdk-dev] [PATCH v7] " Murphy Yang
2021-01-07  9:17             ` [dpdk-dev] [PATCH v8] " Murphy Yang
2021-01-07  9:33               ` Guo, Jia
2021-01-12  4:52                 ` Zhang, Qi Z
2021-01-13  5:13               ` Huang, ZhiminX

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).