DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jeff Guo <jia.guo@intel.com>
To: qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com
Cc: dev@dpdk.org, junfeng.guo@intel.com, simei.su@intel.com,
	jia.guo@intel.com
Subject: [dpdk-dev] [PATCH v1] net/iavf: fix hash default set
Date: Tue,  4 Aug 2020 10:58:31 +0800	[thread overview]
Message-ID: <20200804025831.99919-1-jia.guo@intel.com> (raw)

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


             reply	other threads:[~2020-08-04  3:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04  2:58 Jeff Guo [this message]
2020-08-04  4:36 ` Zhang, Qi Z
2020-08-05 17:40   ` Thomas Monjalon
2020-08-04  7:03 ` Xie, WeiX

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=20200804025831.99919-1-jia.guo@intel.com \
    --to=jia.guo@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=junfeng.guo@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=simei.su@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).