From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2FBEDA053A; Tue, 4 Aug 2020 05:03:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2051937B4; Tue, 4 Aug 2020 05:03:01 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5187A2BA8 for ; Tue, 4 Aug 2020 05:02:59 +0200 (CEST) IronPort-SDR: OC8LCf7F9UDeZ74T3gXsEOgmexj4CZ7TR8yJSag//SOLFDxuECAdGo+I8o63KpWRw5QPzrrn0l CyJgQTbq7Jrg== X-IronPort-AV: E=McAfee;i="6000,8403,9702"; a="170327727" X-IronPort-AV: E=Sophos;i="5.75,432,1589266800"; d="scan'208";a="170327727" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Aug 2020 20:02:58 -0700 IronPort-SDR: C0J0PHQGc+1Oc/Negfd2W/qu7bpdUGUapzSmxn9RApk3p7pTYK7fHQ6kwZj0DqGAoX4aWF86rZ tP4jZ+IJQ9oQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,432,1589266800"; d="scan'208";a="492713903" Received: from npg-dpdk-cvl-jeffguo-01.sh.intel.com ([10.67.111.128]) by fmsmga005.fm.intel.com with ESMTP; 03 Aug 2020 20:02:56 -0700 From: Jeff Guo 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 Date: Tue, 4 Aug 2020 10:58:31 +0800 Message-Id: <20200804025831.99919-1-jia.guo@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v1] net/iavf: fix hash default set X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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