diff mbox series

net/iavf: fix symmetric rule creating

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

Checks

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

Commit Message

Xuan Ding Jan. 22, 2021, 3:19 a.m. UTC
Only allow to create symmetric rule for L3/L4.

Fixes: 91f27b2e39ab("net/iavf: refactor RSS")
Cc: stable@dpdk.org

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

Comments

Xing, Beilei Jan. 22, 2021, 4:05 a.m. UTC | #1
> -----Original Message-----
> From: Ding, Xuan <xuan.ding@intel.com>
> Sent: Friday, January 22, 2021 11:19 AM
> 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/iavf: fix symmetric rule creating
> 
> Only allow to create symmetric rule for L3/L4.
> 
> Fixes: 91f27b2e39ab("net/iavf: refactor RSS")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Zhang, Qi Z Jan. 25, 2021, 12:46 p.m. UTC | #2
> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Friday, January 22, 2021 12:05 PM
> To: Ding, Xuan <xuan.ding@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [PATCH] net/iavf: fix symmetric rule creating
> 
> 
> 
> > -----Original Message-----
> > From: Ding, Xuan <xuan.ding@intel.com>
> > Sent: Friday, January 22, 2021 11:19 AM
> > 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/iavf: fix symmetric rule creating
> >
> > Only allow to create symmetric rule for L3/L4.
> >
> > Fixes: 91f27b2e39ab("net/iavf: refactor RSS")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Xuan Ding <xuan.ding@intel.com>
> Acked-by: Beilei Xing <beilei.xing@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
diff mbox series

Patch

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 958c73c4fb..5fa2f3cf59 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -927,6 +927,13 @@  iavf_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 */