lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACLfguWDQ-NqNV6w2BAGQS_fA0+ADhVVOJbzDC+rt4u8Trhu3Q@mail.gmail.com>
Date: Mon, 19 Jan 2026 10:12:16 +0800
From: Cindy Lu <lulu@...hat.com>
To: Dragos Tatulea <dtatulea@...dia.com>
Cc: 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 1/3] vdpa/mlx5: update mlx_features with driver state check

On Fri, Jan 2, 2026 at 8:09 PM Dragos Tatulea <dtatulea@...dia.com> wrote:
>
>
> Hi Cindy,
>
> Thanks for your patch!
>
> On 29.12.25 08:16, Cindy Lu wrote:
> > Add logic in mlx5_vdpa_set_attr() to ensure the VIRTIO_NET_F_MAC
> > feature bit is properly set only when the device is not yet in
> > the DRIVER_OK (running) state.
> >
> > This makes the MAC address visible in the output of:
> >
> >  vdpa dev config show -jp
> >
> > when the device is created without an initial MAC address.
> >
> > Signed-off-by: Cindy Lu <lulu@...hat.com>
>
> Having a cover letter with the summary, history and links series would
> make the review process easier.
>
> > ---
> >  drivers/vdpa/mlx5/net/mlx5_vnet.c | 13 +++++++++++--
> >  1 file changed, 11 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > index ddaa1366704b..6e42bae7c9a1 100644
> > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > @@ -4049,7 +4049,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 = -EOPNOTSUPP;
> > +     int err = 0;
> >
> >       mvdev = to_mvdev(dev);
> >       ndev = to_mlx5_vdpa_ndev(mvdev);
> > @@ -4057,13 +4057,22 @@ static int mlx5_vdpa_set_attr(struct vdpa_mgmt_dev *v_mdev, struct vdpa_device *
> >       config = &ndev->config;
> >
> >       down_write(&ndev->reslock);
> > -     if (add_config->mask & (1 << VDPA_ATTR_DEV_NET_CFG_MACADDR)) {
> > +
> > +     if (add_config->mask & BIT_ULL(VDPA_ATTR_DEV_NET_CFG_MACADDR)) {
> > +             if (!(ndev->mvdev.status & VIRTIO_CONFIG_S_DRIVER_OK)) {
> > +                     ndev->mvdev.mlx_features |= BIT_ULL(VIRTIO_NET_F_MAC);
> > +             } else {
> > +                     mlx5_vdpa_warn(mvdev, "device running, skip updating MAC\n");
> > +                     err = -EBUSY;
> > +                     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);
> >       }
> >
> > +out:
> >       up_write(&ndev->reslock);
> >       return err;
> >  }
> The patch itself makes sense. For it you can add:
>
> Reviewed-by: Dragos Tatulea <dtatulea@...dia.com>
>
Thanks Dragos, will add this
> Thanks,
> Dragos
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ