From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 952C42C17; Tue, 15 Jan 2019 03:13:51 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2019 18:13:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,480,1539673200"; d="scan'208";a="126075331" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga002.jf.intel.com with ESMTP; 14 Jan 2019 18:13:50 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 14 Jan 2019 18:13:49 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 14 Jan 2019 18:13:50 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.63]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.159]) with mapi id 14.03.0415.000; Tue, 15 Jan 2019 10:13:47 +0800 From: "Wu, Yanglong" To: "Zhang, Qi Z" , "dev@dpdk.org" CC: "Hall, Ryan E" , "stable@dpdk.org" Thread-Topic: [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT Thread-Index: AQHUq+TZ0n93+0eYdkqArzds5ml0vKWuMOCAgAFlU4A= Date: Tue, 15 Jan 2019 02:13:47 +0000 Message-ID: References: <20190114082405.106073-1-yanglong.wu@intel.com> <039ED4275CED7440929022BC67E706115331AEA8@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E706115331AEA8@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.0.400.15 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTVjMjQxODItN2QwZS00NjRkLWEwZWUtZmFhZTJhNjc3OGRiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSFdcL1Fwdk1Wa3hMQ1wvUCtBczdqbk15Y2FZc0VCZ0pEZVpIcTBWUWYyKzJsWDVROUtsTXVoV2dOWDhCRlZ3XC9EbiJ9 x-ctpclassification: CTP_NT 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] [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT 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: , X-List-Received-Date: Tue, 15 Jan 2019 02:13:52 -0000 Hi qi, -----Original Message----- From: Zhang, Qi Z=20 Sent: Monday, January 14, 2019 8:48 PM To: Wu, Yanglong ; dev@dpdk.org Cc: Hall, Ryan E ; stable@dpdk.org Subject: RE: [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT > -----Original Message----- > From: Wu, Yanglong > Sent: Monday, January 14, 2019 4:24 PM > To: dev@dpdk.org > Cc: Hall, Ryan E ; Zhang, Qi Z=20 > ; Wu, Yanglong ;=20 > stable@dpdk.org > Subject: [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT I think this is not a just for FPK, but for all i40e family right? >>From the code, just FPK have this problem. it not well designed when it tr= ansfer to admin queue.=20 >=20 > i40e_aq_set_rss_lut should set rigister according to the vsi->type. if=20 > not, VF may overwrite the rigister of PF >=20 > Fixes: d0a349409bd7 ("i40e: support AQ based RSS config") > Cc: stable@dpdk.org >=20 > Signed-off-by: Wu Yanglong It should be "Yanglong Wu" Ok, will send the version two. > --- > drivers/net/i40e/i40e_ethdev.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c=20 > b/drivers/net/i40e/i40e_ethdev.c index a6b97e164..d4d99edcd 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -4183,8 +4183,13 @@ i40e_get_rss_lut(struct i40e_vsi *vsi, uint8_t=20 > *lut, uint16_t lut_size) > return -EINVAL; >=20 > if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) { > - ret =3D i40e_aq_get_rss_lut(hw, vsi->vsi_id, TRUE, > - lut, lut_size); > + if (vsi->type =3D=3D I40E_VSI_SRIOV) { > + ret =3D i40e_aq_get_rss_lut(hw, vsi->vsi_id, FALSE, > + lut, lut_size); > + } else { > + ret =3D i40e_aq_get_rss_lut(hw, vsi->vsi_id, TRUE, > + lut, lut_size); > + } You can simplify above code to below single line ret =3D i40e_aq_get_rss_lut(hw, vsi->vsi_id, vsi->type !=3D I40E_VSI_SRIOV,= lut, lut_size); thanks, it would be better. > if (ret) { > PMD_DRV_LOG(ERR, "Failed to get RSS lookup table"); > return ret; > -- > 2.11.0