From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 02F421B128; Tue, 15 Jan 2019 03:39:49 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2019 18:39:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,480,1539673200"; d="scan'208";a="114714045" Received: from wuyanglong.sh.intel.com ([10.67.111.136]) by fmsmga007.fm.intel.com with ESMTP; 14 Jan 2019 18:39:46 -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: Tue, 15 Jan 2019 10:23:45 +0800 Message-Id: <20190115022345.108212-1-yanglong.wu@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190114082405.106073-1-yanglong.wu@intel.com> References: <20190114082405.106073-1-yanglong.wu@intel.com> Subject: [dpdk-dev] [PATCH v2] 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:39:50 -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: Yanglong Wu --- drivers/net/i40e/i40e_ethdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index a6b97e164..f97cd5348 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -4183,7 +4183,8 @@ 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, + ret = i40e_aq_get_rss_lut(hw, vsi->vsi_id, + vsi->type != I40E_VSI_SRIOV, lut, lut_size); if (ret) { PMD_DRV_LOG(ERR, "Failed to get RSS lookup table"); @@ -4222,7 +4223,8 @@ i40e_set_rss_lut(struct i40e_vsi *vsi, uint8_t *lut, uint16_t lut_size) hw = I40E_VSI_TO_HW(vsi); if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) { - ret = i40e_aq_set_rss_lut(hw, vsi->vsi_id, TRUE, + ret = i40e_aq_set_rss_lut(hw, vsi->vsi_id, + vsi->type != I40E_VSI_SRIOV, lut, lut_size); if (ret) { PMD_DRV_LOG(ERR, "Failed to set RSS lookup table"); -- 2.11.0