On Sun, 22 Jan 2023 15:47:08 +0200 Eli Cohen wrote:v2 sent, but I rely on virtio_has_feature(vdev, VIRTIO_NET_F_MAC) to know if the MAC address is provided by the device or not:
@@ -3956,6 +3958,18 @@ static int virtnet_probe(struct virtio_device *vdev)Maybe it's better to not count on addr_assign_type and use a local
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 &&
variable to indicate that virtnet_probe assigned random MAC.
+1, FWIW