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 EFF661B1F5; Mon, 14 Jan 2019 13:48:06 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2019 04:48:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,477,1539673200"; d="scan'208";a="291402518" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 14 Jan 2019 04:48:05 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 14 Jan 2019 04:48:05 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.150]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.159]) with mapi id 14.03.0415.000; Mon, 14 Jan 2019 20:48:03 +0800 From: "Zhang, Qi Z" To: "Wu, Yanglong" , "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+TZD2oERZ5K2k2vOcqsCf9fE6WutdEQ Date: Mon, 14 Jan 2019 12:48:03 +0000 Message-ID: <039ED4275CED7440929022BC67E706115331AEA8@SHSMSX103.ccr.corp.intel.com> References: <20190114082405.106073-1-yanglong.wu@intel.com> In-Reply-To: <20190114082405.106073-1-yanglong.wu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTVjMjQxODItN2QwZS00NjRkLWEwZWUtZmFhZTJhNjc3OGRiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSFdcL1Fwdk1Wa3hMQ1wvUCtBczdqbk15Y2FZc0VCZ0pEZVpIcTBWUWYyKzJsWDVROUtsTXVoV2dOWDhCRlZ3XC9EbiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 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] [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: Mon, 14 Jan 2019 12:48:07 -0000 > -----Original Message----- > From: Wu, Yanglong > Sent: Monday, January 14, 2019 4:24 PM > To: dev@dpdk.org > Cc: Hall, Ryan E ; Zhang, Qi Z ; > Wu, Yanglong ; 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? >=20 > i40e_aq_set_rss_lut should set rigister according to the vsi->type. if no= t, 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" > --- > drivers/net/i40e/i40e_ethdev.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.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 *lu= t, > 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); > if (ret) { > PMD_DRV_LOG(ERR, "Failed to get RSS lookup table"); > return ret; > -- > 2.11.0