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 B7BE5A0567 for ; Wed, 11 Mar 2020 10:17:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9D83B1C010; Wed, 11 Mar 2020 10:17:25 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id AC0E81BFF7; Wed, 11 Mar 2020 10:17:22 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Mar 2020 02:17:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,540,1574150400"; d="scan'208";a="353837436" Received: from dpdk.sh.intel.com ([10.239.255.129]) by fmsmga001.fm.intel.com with ESMTP; 11 Mar 2020 02:17:19 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Wenzhuo Lu , Qiming Yang , Guinan Sun , stable@dpdk.org Date: Wed, 11 Mar 2020 09:06:51 +0000 Message-Id: <20200311090651.4328-1-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200310025836.70492-1-guinanx.sun@intel.com> References: <20200310025836.70492-1-guinanx.sun@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v2] net/ixgbe: fix setting VF MAC address X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" The reason why PF cannot receive data normally is that vf performed the clear_rar operation through dev close without adding a mac address.  This will cause the association between the index and rx address set by VMDq to be cancelled,thus affecting the data reception of PF. The correction method is to add a check action, and do not perform the set_rar operation without adding a mac address to prevent affecting the reception of data. Fixes: 3c4270187518 ("net/ixgbe: support VF MAC address add/remove") Cc: stable@dpdk.org Signed-off-by: Guinan Sun --- v2 changes: * Modify commit log --- drivers/net/ixgbe/ixgbe_pf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index afae21f81..67b5bef44 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -783,8 +783,10 @@ ixgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) hw->mac.ops.set_rar(hw, vf_info[vf].mac_count, new_mac, vf, IXGBE_RAH_AV); } else { - hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count); - vf_info[vf].mac_count = 0; + if (vf_info[vf].mac_count) { + hw->mac.ops.clear_rar(hw, vf_info[vf].mac_count); + vf_info[vf].mac_count = 0; + } } return 0; } -- 2.17.1