[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3fa838af-4eec-441c-8739-020990d1826d@nvidia.com>
Date: Fri, 2 Jan 2026 13:14:00 +0100
From: Dragos Tatulea <dtatulea@...dia.com>
To: Cindy Lu <lulu@...hat.com>, mst@...hat.com, jasowang@...hat.com,
virtualization@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v2 3/3] vdpa/mlx5: update MAC address handling in
mlx5_vdpa_set_attr()
On 29.12.25 08:16, Cindy Lu wrote:
> 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 <lulu@...hat.com>
> ---
> drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index c87e6395b060..a75788ace401 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -4055,7 +4055,6 @@ static void mlx5_vdpa_dev_del(struct vdpa_mgmt_dev *v_mdev, struct vdpa_device *
> static int mlx5_vdpa_set_attr(struct vdpa_mgmt_dev *v_mdev, struct vdpa_device *dev,
> const struct vdpa_dev_set_config *add_config)
> {
> - struct virtio_net_config *config;
> struct mlx5_core_dev *pfmdev;
> struct mlx5_vdpa_dev *mvdev;
> struct mlx5_vdpa_net *ndev;
> @@ -4065,7 +4064,6 @@ static int mlx5_vdpa_set_attr(struct vdpa_mgmt_dev *v_mdev, struct vdpa_device *
> mvdev = to_mvdev(dev);
> ndev = to_mlx5_vdpa_ndev(mvdev);
> mdev = mvdev->mdev;
> - config = &ndev->config;
>
> down_write(&ndev->reslock);
>
> @@ -4078,9 +4076,7 @@ static int mlx5_vdpa_set_attr(struct vdpa_mgmt_dev *v_mdev, struct vdpa_device *
> goto out;
> }
> pfmdev = pci_get_drvdata(pci_physfn(mdev->pdev));
> - err = mlx5_mpfs_add_mac(pfmdev, config->mac);
> - if (!err)
> - ether_addr_copy(config->mac, add_config->net.mac);
> + err = mlx5_vdpa_change_new_mac(ndev, pfmdev, (u8 *)add_config->net.mac);
> }
>
> out:
Thanks for your patch. It looks much better like this.
Reviewed-by: Dragos Tatulea <dtatulea@...dia.com>
Thanks,
Dragos
Powered by blists - more mailing lists