[pve-devel] [PATCH qemu-server 1/1] Close #2443: qemu-server: add MTU option to virtio-net device

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Feb 7 13:31:21 CET 2020


On 2/3/20 6:29 AM, Alexandre DERUMIER wrote:
> Hi,
> sorry to bump this thread, but I'm seeing users requesting this on the forum,
> and I think I'll need it too for vxlan setup, when users can't increase the mtu on physical interfaces
> (and so, need to reduce it in the vms)
> 
> 
> 
>>> As far as I can see, the guest sets the MTU to 1500 on the virtio
>>> interface, unless qemu explicitly sets host_mtu for the adapter being
>>> created, regardless of the MTU of the tap interface on the host.
>>> This is essentially the normal behavior of the operating system and the
>>> virtio driver if no additional information about the host system is
>>> passed on.
> 
>>> Thus, I think in the future it would be logical to add a patch that
>>> would install host_mtu explicitly if the tap interface on the host
>>> system is set to MTU different from 1500. The tap interface itself
>>> inherits the MTU from the bridge interface in which it is "connected".
> 
> I can adapt the patch to map the mtu in guest, to mtu of bridge/tap.
> 
> 
>>> + mtu => { 
>>> + type => 'number', 
>>> + minimum => 576, maximum=> 65536, 
> 
> Not sure, is it possible to add an extra "1" value for "auto" ?
> 
> or maybe, do we want to force it, if bridge mtu is < 1500 ?
> (as guest mtu is 1500 by default, it will break anyway if bridge mtu < 1500)

sounds OK to me. We may also want to die for non virtio-net devices, as it
won't silently work and that could be possibly confusing for users..




More information about the pve-devel mailing list