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 DC400A0350; Tue, 12 May 2020 04:17:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A612C1C117; Tue, 12 May 2020 04:17:51 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id A1A441C0DB for ; Tue, 12 May 2020 04:17:49 +0200 (CEST) IronPort-SDR: 824ir20X4Vt7CGhkkQM9A9w9yPcP2vxI7dVyLh+GnvItrV/CL3h2+8jJmLExuagfM/5dDX3teh UgMrYQHcSHUw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2020 19:17:48 -0700 IronPort-SDR: TPdqAdwmWlWuziNkVBKgiBcB8XPe3bIOMaZWGe5hVvWIY4/kjbf4/4XdF9RZ0Ap+4i6KdbdtbS nsg4IaavrAjg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,381,1583222400"; d="scan'208";a="340739959" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 11 May 2020 19:17:48 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 11 May 2020 19:17:48 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 11 May 2020 19:17:47 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.26]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.95]) with mapi id 14.03.0439.000; Tue, 12 May 2020 10:17:35 +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: AQHWJdvBKR0lNdDwiUOhiHdrtKGKDKijunyg Date: Tue, 12 May 2020 02:17:34 +0000 Message-ID: <039ED4275CED7440929022BC67E70611548142B9@SHSMSX103.ccr.corp.intel.com> References: <20200509202730.70367-1-jia.guo@intel.com> In-Reply-To: <20200509202730.70367-1-jia.guo@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: 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 >=20 > When configure rss rule, the etherdev rss hash function type should be ma= pped > to the corresponding virtchnl rss algorithm type. >=20 > 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(-) >=20 > 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 { >=20 > struct iavf_rss_meta { > struct virtchnl_proto_hdrs *proto_hdrs; > - uint32_t hash_function; > + enum virtchnl_rss_algorithm rss_algorithm; > }; >=20 > struct iavf_hash_flow_cfg { > @@ -1001,13 +1001,15 @@ iavf_hash_parse_action(struct > iavf_pattern_match_item *pattern_match_item, >=20 > /* 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; RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ --> VIRTCHNL_RSS_ALG_R_ASYMMETRIC Is it should be VIRTCHNL_RSS_ALG_XOR_SYMMETRIC? > + 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; >=20 > type_match_item =3D > rte_zmalloc("iavf_type_match_item", > @@ -1126,7 +1128,7 @@ iavf_hash_create(__rte_unused struct iavf_adapter > *ad, > } >=20 > 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; >=20 > ret =3D iavf_add_del_rss_cfg(ad, rss_cfg, true); > if (!ret) { > -- > 2.20.1