[v1] net/iavf: fix hash default set
diff mbox series

Message ID 20200804025831.99919-1-jia.guo@intel.com
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • [v1] net/iavf: fix hash default set
Related show

Checks

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

Commit Message

Jeff Guo Aug. 4, 2020, 2:58 a.m. UTC
Different device has different hash capability, it should not be
expected that all hash set would be successful to set into all
devices by default. So remove the return checking when hash default
set. And remove gtpu hash default set, iavf only enable hash for
general protocols.

Fixes: c94366cfc641 ("net/iavf: add GTPU in default hash")
Signed-off-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 23 ++---------------------
 1 file changed, 2 insertions(+), 21 deletions(-)

Comments

Zhang, Qi Z Aug. 4, 2020, 4:36 a.m. UTC | #1
> -----Original Message-----
> From: Guo, Jia <jia.guo@intel.com>
> Sent: Tuesday, August 4, 2020 10:59 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; Guo, Junfeng <junfeng.guo@intel.com>; Su, Simei
> <simei.su@intel.com>; Guo, Jia <jia.guo@intel.com>
> Subject: [PATCH v1] net/iavf: fix hash default set
> 
> Different device has different hash capability, it should not be expected that all
> hash set would be successful to set into all devices by default. So remove the
> return checking when hash default set. And remove gtpu hash default set, iavf
> only enable hash for general protocols.
> 
> Fixes: c94366cfc641 ("net/iavf: add GTPU in default hash")
> Signed-off-by: Jeff Guo <jia.guo@intel.com>

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

Applied to dpdk-next-net-intel.

Thanks
Qi
Xie, WeiX Aug. 4, 2020, 7:03 a.m. UTC | #2
Tested-by:  Xie,WeiX < weix.xie@intel.com>

Regards,
Xie Wei

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jeff Guo
Sent: Tuesday, August 4, 2020 10:59 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; Guo, Junfeng <junfeng.guo@intel.com>; Su, Simei <simei.su@intel.com>; Guo, Jia <jia.guo@intel.com>
Subject: [dpdk-dev] [PATCH v1] net/iavf: fix hash default set

Different device has different hash capability, it should not be expected that all hash set would be successful to set into all devices by default. So remove the return checking when hash default set. And remove gtpu hash default set, iavf only enable hash for general protocols.

Fixes: c94366cfc641 ("net/iavf: add GTPU in default hash")
Signed-off-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 23 ++---------------------
 1 file changed, 2 insertions(+), 21 deletions(-)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c index e2eebd2d3..c06b52ea9 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -3639,18 +3639,6 @@ struct virtchnl_proto_hdrs *iavf_hash_default_hdrs[] = {
 	&hdrs_hint_ipv6_udp,
 	&hdrs_hint_ipv6_tcp,
 	&hdrs_hint_ipv6_sctp,
-	&hdrs_hint_ipv4_gtpu_ip,
-	&hdrs_hint_ipv4_udp_gtpu_ip,
-	&hdrs_hint_ipv4_tcp_gtpu_ip,
-	&hdrs_hint_ipv4_gtpu_eh,
-	&hdrs_hint_ipv4_udp_gtpu_eh,
-	&hdrs_hint_ipv4_tcp_gtpu_eh,
-	&hdrs_hint_ipv6_gtpu_ip,
-	&hdrs_hint_ipv6_udp_gtpu_ip,
-	&hdrs_hint_ipv6_tcp_gtpu_ip,
-	&hdrs_hint_ipv6_gtpu_eh,
-	&hdrs_hint_ipv6_udp_gtpu_eh,
-	&hdrs_hint_ipv6_tcp_gtpu_eh,
 };
 
 static struct iavf_flow_engine iavf_hash_engine = { @@ -3676,7 +3664,6 @@ iavf_hash_default_set(struct iavf_adapter *ad, bool add)  {
 	struct virtchnl_rss_cfg *rss_cfg;
 	uint16_t i;
-	int ret;
 
 	rss_cfg = rte_zmalloc("iavf rss rule",
 			      sizeof(struct virtchnl_rss_cfg), 0); @@ -3687,16 +3674,10 @@ iavf_hash_default_set(struct iavf_adapter *ad, bool add)
 		rss_cfg->proto_hdrs = *iavf_hash_default_hdrs[i];
 		rss_cfg->rss_algorithm = VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC;
 
-		ret = iavf_add_del_rss_cfg(ad, rss_cfg, add);
-		if (ret) {
-			PMD_DRV_LOG(ERR, "fail to %s RSS configure",
-				    add ? "add" : "delete");
-			rte_free(rss_cfg);
-			return ret;
-		}
+		iavf_add_del_rss_cfg(ad, rss_cfg, add);
 	}
 
-	return ret;
+	return 0;
 }
 
 RTE_INIT(iavf_hash_engine_init)
--
2.20.1
Thomas Monjalon Aug. 5, 2020, 5:40 p.m. UTC | #3
04/08/2020 06:36, Zhang, Qi Z:
> From: Guo, Jia <jia.guo@intel.com>
> > 
> > Different device has different hash capability, it should not be expected that all
> > hash set would be successful to set into all devices by default. So remove the
> > return checking when hash default set. And remove gtpu hash default set, iavf
> > only enable hash for general protocols.
> > 
> > Fixes: c94366cfc641 ("net/iavf: add GTPU in default hash")
> > Signed-off-by: Jeff Guo <jia.guo@intel.com>
> 
> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
> 
> Applied to dpdk-next-net-intel.

It looks it should be 2 separate patches:
	- revert/remove GTPU from default RSS hash
	- ignore error in adding protocols to RSS

Please be more careful in patch reviews.

PS: fixing name in Tested-by: Wei Xie <weix.xie@intel.com>

Patch
diff mbox series

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index e2eebd2d3..c06b52ea9 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -3639,18 +3639,6 @@  struct virtchnl_proto_hdrs *iavf_hash_default_hdrs[] = {
 	&hdrs_hint_ipv6_udp,
 	&hdrs_hint_ipv6_tcp,
 	&hdrs_hint_ipv6_sctp,
-	&hdrs_hint_ipv4_gtpu_ip,
-	&hdrs_hint_ipv4_udp_gtpu_ip,
-	&hdrs_hint_ipv4_tcp_gtpu_ip,
-	&hdrs_hint_ipv4_gtpu_eh,
-	&hdrs_hint_ipv4_udp_gtpu_eh,
-	&hdrs_hint_ipv4_tcp_gtpu_eh,
-	&hdrs_hint_ipv6_gtpu_ip,
-	&hdrs_hint_ipv6_udp_gtpu_ip,
-	&hdrs_hint_ipv6_tcp_gtpu_ip,
-	&hdrs_hint_ipv6_gtpu_eh,
-	&hdrs_hint_ipv6_udp_gtpu_eh,
-	&hdrs_hint_ipv6_tcp_gtpu_eh,
 };
 
 static struct iavf_flow_engine iavf_hash_engine = {
@@ -3676,7 +3664,6 @@  iavf_hash_default_set(struct iavf_adapter *ad, bool add)
 {
 	struct virtchnl_rss_cfg *rss_cfg;
 	uint16_t i;
-	int ret;
 
 	rss_cfg = rte_zmalloc("iavf rss rule",
 			      sizeof(struct virtchnl_rss_cfg), 0);
@@ -3687,16 +3674,10 @@  iavf_hash_default_set(struct iavf_adapter *ad, bool add)
 		rss_cfg->proto_hdrs = *iavf_hash_default_hdrs[i];
 		rss_cfg->rss_algorithm = VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC;
 
-		ret = iavf_add_del_rss_cfg(ad, rss_cfg, add);
-		if (ret) {
-			PMD_DRV_LOG(ERR, "fail to %s RSS configure",
-				    add ? "add" : "delete");
-			rte_free(rss_cfg);
-			return ret;
-		}
+		iavf_add_del_rss_cfg(ad, rss_cfg, add);
 	}
 
-	return ret;
+	return 0;
 }
 
 RTE_INIT(iavf_hash_engine_init)