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 7EF96A053A; Tue, 4 Aug 2020 09:03:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B42E82AB; Tue, 4 Aug 2020 09:03:33 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 7724E255 for ; Tue, 4 Aug 2020 09:03:31 +0200 (CEST) IronPort-SDR: isF5LeprMGTvMseh6z4XWRmSMSh8VfiNz/UvaeuAZqOskrVyfC71sTPEFXizZjJnLFDn6An3+V xndrnMqO4w7g== X-IronPort-AV: E=McAfee;i="6000,8403,9702"; a="132322124" X-IronPort-AV: E=Sophos;i="5.75,433,1589266800"; d="scan'208";a="132322124" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2020 00:03:31 -0700 IronPort-SDR: cYsnr8KdpbWS3rzYQw9pW78P7tjtKLJ7nDSD+A7CcYpfeSZI7Lwe0HbHuFVDZOgr5YTLbWGV97 Qy/eRthfdz8g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,433,1589266800"; d="scan'208";a="322652751" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga008.jf.intel.com with ESMTP; 04 Aug 2020 00:03:30 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 4 Aug 2020 00:03:30 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 4 Aug 2020 00:03:30 -0700 Received: from cdsmsx101.ccr.corp.intel.com (172.17.3.36) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Aug 2020 00:03:30 -0700 Received: from cdsmsx102.ccr.corp.intel.com ([169.254.2.136]) by CDSMSX101.ccr.corp.intel.com ([169.254.1.76]) with mapi id 14.03.0439.000; Tue, 4 Aug 2020 15:03:25 +0800 From: "Xie, WeiX" To: "Guo, Jia" , "Zhang, Qi Z" , "Wu, Jingjing" , "Xing, Beilei" CC: "dev@dpdk.org" , "Guo, Junfeng" , "Su, Simei" , "Guo, Jia" Thread-Topic: [dpdk-dev] [PATCH v1] net/iavf: fix hash default set Thread-Index: AQHWagvl7mgQ5e/tg0ShRxLzwF+VGKknhkxQ Date: Tue, 4 Aug 2020 07:03:25 +0000 Message-ID: <6FD6A7610D20924F885A4ECF34E8AC910464DFD9@CDSMSX102.ccr.corp.intel.com> References: <20200804025831.99919-1-jia.guo@intel.com> In-Reply-To: <20200804025831.99919-1-jia.guo@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.6.105] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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" 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 ; Wu, Jingjing ; Xing, Beilei Cc: dev@dpdk.org; Guo, Junfeng ; Su, Simei ; Guo, Jia Subject: [dpdk-dev] [PATCH v1] net/iavf: fix hash default set Different device has different hash capability, it should not be expected t= hat 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 def= ault 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 in= dex 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[]= =3D { &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, }; =20 static struct iavf_flow_engine iavf_hash_engine =3D { @@ -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; =20 rss_cfg =3D 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 =3D *iavf_hash_default_hdrs[i]; rss_cfg->rss_algorithm =3D VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC; =20 - ret =3D 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); } =20 - return ret; + return 0; } =20 RTE_INIT(iavf_hash_engine_init) -- 2.20.1