diff mbox series

net/iavf: fix negative GTP-U flow rules create successfully

Message ID 20201209071438.32419-1-murphyx.yang@intel.com (mailing list archive)
State Rejected, archived
Delegated to: Qi Zhang
Headers show
Series net/iavf: fix negative GTP-U flow rules create successfully | expand

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Murphy Yang Dec. 9, 2020, 7:14 a.m. UTC
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 mbox series

Patch

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)