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 62636A0350; Tue, 12 May 2020 04:21:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C345A1C0CD; Tue, 12 May 2020 04:21:47 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 60CC41C0B4 for ; Tue, 12 May 2020 04:21:45 +0200 (CEST) IronPort-SDR: EaUvXvPZ6KV2dMqiGLg+aeJ70rRyTcH5YLXvgQllgy7oEOsaQyiRToJM65WYQzkp+/h8qgdX7J R6nKo4FE4Xvw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2020 19:21:44 -0700 IronPort-SDR: SN8zpXNgZD4g8wKpoDfxx6k5tg6sBsLjBm8OCqcVFcbx/55Cfyx/pAy+LjYkR8epgl8oXR6WpS v8Z3K88HuYmg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,381,1583222400"; d="scan'208";a="436909737" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 11 May 2020 19:21:44 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 11 May 2020 19:21:43 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 11 May 2020 19:21:43 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.26]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.225]) with mapi id 14.03.0439.000; Tue, 12 May 2020 10:21:40 +0800 From: "Zhang, Qi Z" To: "Guo, Jia" , "Xing, Beilei" , "Wu, Jingjing" CC: "Ye, Xiaolong" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] net/iavf: fix rss algorithm configure issue Thread-Index: AQHWJdvBKR0lNdDwiUOhiHdrtKGKDKijunyggAABsVA= Date: Tue, 12 May 2020 02:21:39 +0000 Message-ID: <039ED4275CED7440929022BC67E70611548142DF@SHSMSX103.ccr.corp.intel.com> References: <20200509202730.70367-1-jia.guo@intel.com> <039ED4275CED7440929022BC67E70611548142B9@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E70611548142B9@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] net/iavf: fix rss algorithm configure issue 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" > -----Original Message----- > From: Zhang, Qi Z > Sent: Tuesday, May 12, 2020 10:18 AM > To: Guo, Jia ; Xing, Beilei ; W= u, > Jingjing > Cc: Ye, Xiaolong ; dev@dpdk.org > Subject: RE: [dpdk-dev] net/iavf: fix rss algorithm configure issue >=20 >=20 >=20 > > -----Original Message----- > > From: Guo, Jia > > Sent: Sunday, May 10, 2020 4:28 AM > > To: Xing, Beilei ; Zhang, Qi Z > > ; Wu, Jingjing > > Cc: Ye, Xiaolong ; dev@dpdk.org; Guo, Jia > > > > Subject: [dpdk-dev] net/iavf: fix rss algorithm configure issue > > > > When configure rss rule, the etherdev rss hash function type should be > > mapped to the corresponding virtchnl rss algorithm type. > > > > Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF") > > Signed-off-by: Jeff Guo > > --- > > drivers/net/iavf/iavf_hash.c | 20 +++++++++++--------- > > 1 file changed, 11 insertions(+), 9 deletions(-) > > > > diff --git a/drivers/net/iavf/iavf_hash.c > > b/drivers/net/iavf/iavf_hash.c index 6359ead76..173b7633f 100644 > > --- a/drivers/net/iavf/iavf_hash.c > > +++ b/drivers/net/iavf/iavf_hash.c > > @@ -47,7 +47,7 @@ struct iavf_hash_match_type { > > > > struct iavf_rss_meta { > > struct virtchnl_proto_hdrs *proto_hdrs; > > - uint32_t hash_function; > > + enum virtchnl_rss_algorithm rss_algorithm; > > }; > > > > struct iavf_hash_flow_cfg { > > @@ -1001,13 +1001,15 @@ iavf_hash_parse_action(struct > > iavf_pattern_match_item *pattern_match_item, > > > > /* Check hash function and save it to rss_meta. */ > > if (rss->func =3D=3D RTE_ETH_HASH_FUNCTION_SIMPLE_XOR) > > - rss_meta->hash_function =3D > > - RTE_ETH_HASH_FUNCTION_SIMPLE_XOR; > > - > > - if (rss->func =3D=3D > > - RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) > > - rss_meta->hash_function =3D > > - RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ; > > + rss_meta->rss_algorithm =3D > > + VIRTCHNL_RSS_ALG_R_ASYMMETRIC; >=20 > RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ --> > VIRTCHNL_RSS_ALG_R_ASYMMETRIC A typo, it is=20 RTE_ETH_HASH_FUNCTION_SIMPLE_XOR --> VIRTCHNL_RSS_ALG_R_ASYMMETRIC which lo= oks not correct. >=20 > Is it should be VIRTCHNL_RSS_ALG_XOR_SYMMETRIC? >=20 >=20 >=20 > > + else if (rss->func =3D=3D > > + RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) > > + rss_meta->rss_algorithm =3D > > + VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC; > > + else > > + rss_meta->rss_algorithm =3D > > + VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC; > > > > type_match_item =3D > > rte_zmalloc("iavf_type_match_item", > > @@ -1126,7 +1128,7 @@ iavf_hash_create(__rte_unused struct > > iavf_adapter *ad, > > } > > > > rss_cfg->proto_hdrs =3D *rss_meta->proto_hdrs; > > - rss_cfg->rss_algorithm =3D rss_meta->hash_function; > > + rss_cfg->rss_algorithm =3D rss_meta->rss_algorithm; > > > > ret =3D iavf_add_del_rss_cfg(ad, rss_cfg, true); > > if (!ret) { > > -- > > 2.20.1