Re: [PATCH 1/4] virtio_net: notify MAC address change on device initialization

From: Jakub Kicinski
Date: Mon Jan 23 2023 - 22:31:22 EST


On Sun, 22 Jan 2023 15:47:08 +0200 Eli Cohen wrote:
> > @@ -3956,6 +3958,18 @@ static int virtnet_probe(struct virtio_device *vdev)
> > pr_debug("virtnet: registered device %s with %d RX and TX vq's\n",
> > dev->name, max_queue_pairs);
> >
> > + /* a random MAC address has been assigned, notify the device */
> > + if (dev->addr_assign_type == NET_ADDR_RANDOM &&
> Maybe it's better to not count on addr_assign_type and use a local
> variable to indicate that virtnet_probe assigned random MAC.

+1, FWIW