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 73EA9A0C4D; Mon, 6 Sep 2021 04:36:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35D0640E32; Mon, 6 Sep 2021 04:36:04 +0200 (CEST) Received: from mail-m972.mail.163.com (mail-m972.mail.163.com [123.126.97.2]) by mails.dpdk.org (Postfix) with ESMTP id 9D0EB40C35; Mon, 6 Sep 2021 04:36:01 +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=wQ18O g80AxofYZ6fMnWMk294uVDy7mT+QMQtucv8bNQ=; b=BDq141lM70ENSzS26gRX5 45eTUXcLpHgMuk0ULtZIy/fDJ3/rtjTqkPsegBHBq/iXgWMcIZMjryOvdlJyXtGt xv+VjV0kKA3SY0VZTUP0iV48am3GtGR2d2yH1px7kOg9Gm7gvsnLk9Gwey+Slx+s 4IiQWnA9s8jwj+uujlw6sw= Received: from localhost.localdomain (unknown [124.160.214.74]) by smtp2 (Coremail) with SMTP id GtxpCgCHB76MfjVhVQqfRg--.55S2; Mon, 06 Sep 2021 10:35:59 +0800 (CST) From: Qiming Chen To: dev@dpdk.org Cc: haiyue.wang@intel.com, Qiming Chen , stable@dpdk.org Date: Mon, 6 Sep 2021 10:35:13 +0800 Message-Id: <20210906023513.9608-1-chenqiming_huawei@163.com> X-Mailer: git-send-email 2.30.1.windows.1 In-Reply-To: <20210831141713.9225-1-chenqiming_huawei@163.com> References: <20210831141713.9225-1-chenqiming_huawei@163.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: GtxpCgCHB76MfjVhVQqfRg--.55S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7WFyfuw1DCw4fZryDGr13XFb_yoW8XF4kpa 97JFWrJ3WqqF4qgw4DXa18WFy7KanYq3yUKrW8C34Yk34UAry0krs2g3WjqryqyrW8W3Wa yF4jyr4UGa13ZFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jvhFcUUUUU= X-Originating-IP: [124.160.214.74] X-CM-SenderInfo: xfkh01xlpl0w5bkxt4lhl6il2tof0z/xtbBURAGoFaEAAYXGAAAs8 Subject: [dpdk-dev] [PATCH v2] 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: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Qiming Chen --- v2: Modify fixes commit --- 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