From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 305ADA93F for ; Tue, 10 Jan 2023 18:16:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A829AC433EF; Tue, 10 Jan 2023 18:16:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1673374602; bh=2oD/y0D3rpipucRQMgvxc9+/kWgAozyojY34wdQ/9q0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xSAEoBNnHO9D63B3chTSksQO7OQoTB6Ls8PJCKRLt7+CxmdwDOdrU10ejFDg7vGUP v9NZVUREN7T/dDyKsVXnWciDvMLqR+Co+KyEQsjgVD7PmPSGU4WLOKEGT1KFRB9Vd0 18YIEztkGjo1vXfuOAMx0vNJVrgcj74m/MzJqwwY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jason Wang , Eli Cohen , "Michael S. Tsirkin" , Sasha Levin Subject: [PATCH 6.1 041/159] vdpa/mlx5: Fix wrong mac address deletion Date: Tue, 10 Jan 2023 19:03:09 +0100 Message-Id: <20230110180019.620039599@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230110180018.288460217@linuxfoundation.org> References: <20230110180018.288460217@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Eli Cohen [ Upstream commit 1ab53760d322c82fb4cb5e81b5817065801e3ec4 ] Delete the old MAC from the table and not the new one which is not there yet. Fixes: baf2ad3f6a98 ("vdpa/mlx5: Add RX MAC VLAN filter support") Acked-by: Jason Wang Signed-off-by: Eli Cohen Message-Id: <20221114131759.57883-4-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin Signed-off-by: Sasha Levin --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 3fb06dcee943..444d6572b2d0 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -1686,7 +1686,7 @@ static virtio_net_ctrl_ack handle_ctrl_mac(struct mlx5_vdpa_dev *mvdev, u8 cmd) /* Need recreate the flow table entry, so that the packet could forward back */ - mac_vlan_del(ndev, ndev->config.mac, 0, false); + mac_vlan_del(ndev, mac_back, 0, false); if (mac_vlan_add(ndev, ndev->config.mac, 0, false)) { mlx5_vdpa_warn(mvdev, "failed to insert forward rules, try to restore\n"); -- 2.35.1