From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 358EC1B43F; Mon, 14 Jan 2019 09:40:26 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2019 00:40:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,477,1539673200"; d="scan'208";a="109682445" Received: from wuyanglong.sh.intel.com ([10.67.111.136]) by orsmga008.jf.intel.com with ESMTP; 14 Jan 2019 00:40:23 -0800 From: Yanglong Wu To: dev@dpdk.org Cc: ryan.e.hall@intel.com, qi.z.zhang@intel.com, Yanglong Wu , stable@dpdk.org Date: Mon, 14 Jan 2019 16:24:05 +0800 Message-Id: <20190114082405.106073-1-yanglong.wu@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [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 08:40:26 -0000 i40e_aq_set_rss_lut should set rigister according to the vsi->type. if not, VF may overwrite the rigister of PF Fixes: d0a349409bd7 ("i40e: support AQ based RSS config") Cc: stable@dpdk.org Signed-off-by: Wu Yanglong --- drivers/net/i40e/i40e_ethdev.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c 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 *lut, uint16_t lut_size) return -EINVAL; if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) { - ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, TRUE, - lut, lut_size); + if (vsi->type == I40E_VSI_SRIOV) { + ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, FALSE, + lut, lut_size); + } else { + ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, TRUE, + lut, lut_size); + } if (ret) { PMD_DRV_LOG(ERR, "Failed to get RSS lookup table"); return ret; -- 2.11.0