DPDK patches and discussions
 help / color / mirror / Atom feed
From: Murphy Yang <murphyx.yang@intel.com>
To: dev@dpdk.org
Cc: qiming.yang@intel.com, stevex.yang@intel.com,
	jingjing.wu@intel.com, beilei.xing@intel.com,
	Murphy Yang <murphyx.yang@intel.com>
Subject: [dpdk-dev] [PATCH] net/iavf: fix negative GTP-U flow rules create successfully
Date: Wed,  9 Dec 2020 07:14:38 +0000	[thread overview]
Message-ID: <20201209071438.32419-1-murphyx.yang@intel.com> (raw)

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


             reply	other threads:[~2020-12-09  7:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  7:14 Murphy Yang [this message]
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

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=20201209071438.32419-1-murphyx.yang@intel.com \
    --to=murphyx.yang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stevex.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).