[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 <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2026-04-23 14:12:00 +01:00
parent ea24689629
commit 2b2580f78f

View File

@ -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;
}
}