From: Cindy Lu Date: Mon, 26 Jan 2026 09:45:38 +0000 (+0800) Subject: vdpa/mlx5: update MAC address handling in mlx5_vdpa_set_attr() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3c33e002b58ebcbd6c5f6e00643f7437546e4f7;p=thirdparty%2Flinux.git vdpa/mlx5: update MAC address handling in mlx5_vdpa_set_attr() Improve MAC address handling in mlx5_vdpa_set_attr() to ensure that old MAC entries are properly removed from the MPFS table before adding a new one. The new MAC address is then added to both the MPFS and VLAN tables. This change fixes an issue where the updated MAC address would not take effect until QEMU was rebooted. Signed-off-by: Cindy Lu Reviewed-by: Dragos Tatulea Signed-off-by: Michael S. Tsirkin Message-ID: <20260126094848.9601-4-lulu@redhat.com> --- diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 14d3fff7bcb7e..ad0d5fbbbca84 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -4057,7 +4057,7 @@ static int mlx5_vdpa_set_attr(struct vdpa_mgmt_dev *v_mdev, struct vdpa_device * struct mlx5_vdpa_dev *mvdev; struct mlx5_vdpa_net *ndev; struct mlx5_core_dev *mdev; - int err = 0; + int err = -EOPNOTSUPP; mvdev = to_mvdev(dev); ndev = to_mlx5_vdpa_ndev(mvdev);