From patchwork Tue Mar 10 02:58:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinan Sun X-Patchwork-Id: 66477 X-Patchwork-Delegate: xiaolong.ye@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A93BFA0563; Tue, 10 Mar 2020 04:06:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E5C141BFFA; Tue, 10 Mar 2020 04:06:24 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 355B41BFFA; Tue, 10 Mar 2020 04:06:22 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Mar 2020 20:06:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,518,1574150400"; d="scan'208";a="321645730" Received: from dpdk.sh.intel.com ([10.239.255.129]) by orsmga001.jf.intel.com with ESMTP; 09 Mar 2020 20:06:19 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Wenzhuo Lu , Qiming Yang , Guinan Sun , stable@dpdk.org Date: Tue, 10 Mar 2020 02:58:36 +0000 Message-Id: <20200310025836.70492-1-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/ixgbe: fix setting VF MAC address 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This problem occurs because clear_rar is executed at the wrong time, so PF cannot receive data normally. This patch is used to modify the calling logic of clear_rar. Fixes: 3c4270187518 ("net/ixgbe: support VF MAC address add/remove") Cc: stable@dpdk.org Signed-off-by: Guinan Sun --- 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; }