From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 904B8A0C46; Tue, 31 Aug 2021 16:18:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B39C40141; Tue, 31 Aug 2021 16:18:09 +0200 (CEST) Received: from mail-m973.mail.163.com (mail-m973.mail.163.com [123.126.97.3]) by mails.dpdk.org (Postfix) with ESMTP id 56D044013F; Tue, 31 Aug 2021 16:18:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=plzwu L90rNk5WLX4ap87+5wluBraimcbjS2ndLVfgAo=; b=HcK7wUhXABC/J6b8LXwUG c12aZR8HfSWm/idf161WzNhsKwl2ETGdDjaUyEku+vhnZni2j9JJxUAUfL1djS44 ypsWLRRIayWCmvCtK9QxO+InYQ4eGlocqYe5El1aPUZaUoX5z1MBG018rid9VcUA Bd9bhe51cRo/9DiSZgy0lY= Received: from localhost.localdomain (unknown [124.160.214.152]) by smtp3 (Coremail) with SMTP id G9xpCgBHqtIYOi5hZtcRFA--.36201S2; Tue, 31 Aug 2021 22:18:02 +0800 (CST) From: Qiming Chen To: dev@dpdk.org Cc: haiyue.wang@intel.com, Qiming Chen , stable@dpdk.org Date: Tue, 31 Aug 2021 22:17:13 +0800 Message-Id: <20210831141713.9225-1-chenqiming_huawei@163.com> X-Mailer: git-send-email 2.30.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: G9xpCgBHqtIYOi5hZtcRFA--.36201S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7WFyfuw1DCw4fZryDGr13XFb_yoW8XF15pF Z7JFWrJ3WqqF4qgw4DXa1rWFy3KanYq3yUKrW8A3s0k34DAry0yrs2ga4jvr90yrW8W3W3 AF4jyr4UGa13ZFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jm4EiUUUUU= X-Originating-IP: [124.160.214.152] X-CM-SenderInfo: xfkh01xlpl0w5bkxt4lhl6il2tof0z/xtbBZAAAoFQHOTuFnQAAsN Subject: [dpdk-dev] [PATCH] net/ixgbe: fix vf mac remains X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" In the following two scenarios, the mac address residual problem will occur: 1) In the VF hard pass-through environment, after adding the mac address, the process restarts, and the previously added mac is still valid; 2) In the vf hard pass-through environment, after the mac address is issued, the port will start/stop, and the previously added mac is still valid; The patch clears the mac address at the start and stop of the vf port. After the start is cleared, the rte framework will restore the mac addition to solve the problem of residual mac addresses. Fixes: abf7275bbaa2 ("ixgbe: move to drivers/net/") Cc: stable@dpdk.org Signed-off-by: Qiming Chen --- drivers/net/ixgbe/ixgbe_ethdev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 6a91f104e1..e40350d86e 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -5410,6 +5410,9 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) */ ixgbevf_dev_link_update(dev, 0); + /* Clear the mac address, the rte frame will be restored */ + ixgbevf_set_uc_addr_vf(hw, 0, NULL); + hw->adapter_stopped = false; return 0; @@ -5454,6 +5457,9 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev) intr_handle->intr_vec = NULL; } + /* Clear the mac address */ + ixgbevf_set_uc_addr_vf(hw, 0, NULL); + adapter->rss_reta_updated = 0; return 0; -- 2.30.1.windows.1