diff mbox series

net/ice: fix symmetric rule creating

Message ID 20210121072657.17823-1-xuan.ding@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers show
Series net/ice: fix symmetric rule creating | expand

Checks

Context Check Description
ci/iol-testing warning Testing issues
ci/iol-mellanox-Functional success Functional Testing PASS
ci/Intel-compilation fail Compilation issues
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Ding, Xuan Jan. 21, 2021, 7:26 a.m. UTC
Only allow to create symmetric rule for L3/L4.

Fixes: 38d632cbdc88("net/ice: refactor PF RSS")
Cc: stable@dpdk.org

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
---
 drivers/net/ice/ice_hash.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Zhang, Qi Z Jan. 22, 2021, 2:42 a.m. UTC | #1
> -----Original Message-----
> From: Ding, Xuan <xuan.ding@intel.com>
> Sent: Thursday, January 21, 2021 3:27 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Ding, Xuan <xuan.ding@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/ice: fix symmetric rule creating
> 
> Only allow to create symmetric rule for L3/L4.
> 
> Fixes: 38d632cbdc88("net/ice: refactor PF RSS")
> Cc: stable@dpdk.org

Fix on current release, no need to CC stable.
> 
> Signed-off-by: Xuan Ding <xuan.ding@intel.com>

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

Applied to dpdk-next-net-intel.

Thanks
Qi
diff mbox series

Patch

diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 2d23c8dd50..aee4761625 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -868,6 +868,13 @@  ice_any_invalid_rss_type(enum rte_eth_hash_function rss_func,
 		if (rss_type & (ETH_RSS_L3_SRC_ONLY | ETH_RSS_L3_DST_ONLY |
 		    ETH_RSS_L4_SRC_ONLY | ETH_RSS_L4_DST_ONLY))
 			return true;
+
+		if (!(rss_type &
+		   (ETH_RSS_IPV4 | ETH_RSS_IPV6 |
+		    ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV6_UDP |
+		    ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_NONFRAG_IPV6_TCP |
+		    ETH_RSS_NONFRAG_IPV4_SCTP | ETH_RSS_NONFRAG_IPV6_SCTP)))
+			return true;
 	}
 
 	/* check invalid combination */