From 2b2580f78f4640aff21c0f57ff282a218fbce9f4 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 23 Apr 2026 14:12:00 +0100 Subject: [PATCH] [virtio] Set MTU for both modern and legacy devices Commit b9d68b9 ("[ethernet] Use standard 1500 byte MTU unless explicitly overridden") added code to explicitly set the MTU for virtio-net devices, but only on the legacy probe path. Make the behaviour consistent by setting the MTU on both legacy and modern probe paths. Signed-off-by: Michael Brown --- src/drivers/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/drivers/net/virtio-net.c b/src/drivers/net/virtio-net.c index 0c4541924..cb55ea041 100644 --- a/src/drivers/net/virtio-net.c +++ b/src/drivers/net/virtio-net.c @@ -623,6 +623,7 @@ static int virtnet_probe_modern ( struct pci_device *pci, int *found_dev ) { DBGC ( virtnet, "VIRTIO-NET %p mtu=%d\n", virtnet, mtu ); netdev->max_pkt_len = ( mtu + ETH_HLEN ); + netdev->mtu = mtu; } }