Am 04.09.25 um 11:28 AM schrieb Fiona Ebner: > Am 04.09.25 um 11:11 AM schrieb Fabian Grünbichler: >> On September 3, 2025 4:22 pm, Fiona Ebner wrote: >>> @@ -1484,10 +1494,37 @@ sub print_netdevice_full { >>> >>> my $mtu = $net->{mtu}; >>> >>> - if ($net->{model} eq 'virtio' && $net->{bridge}) { >>> + if (defined($host_mtu_migration)) { >>> + if ($host_mtu_migration) { >>> + if (defined($mtu) && $mtu != 1) { >>> + if ($mtu != $host_mtu_migration) { >>> + log_warn( >>> + "netdev $netid: using >>> 'host_mtu=$host_mtu_migration' for migration compat," >>> + . " but value different from value in >>> configuration '$mtu'"); >>> + } # else avoid being overly verbose if there is an >>> explicit setting >> >> can this happen in practice (without manually editing the config or >> manual QMP commands)? > > I don't think so. But since we have the info, I though it'd be good to > warn about it. > >> >>> + } else { >>> + print "netdev $netid: using 'host_mtu=$host_mtu_migration' >>> for migration compat\n"; >>> + } >>> + } else { >>> + print "netdev $netid: not adding 'host_mtu' parameter for >>> migration compat\n"; >>> + } >>> + } >> >> this if here
Oh, I suppose you mean the 'if' further above, not the one right below? I had that at first, but decided to split out printing the messages to avoid cluttering the code below. >> >>> + >>> + if ( >>> + $net->{model} eq 'virtio' >>> + && $net->{bridge} >>> + && (!defined($host_mtu_migration) || $host_mtu_migration) >>> + ) { >>> my $bridge_mtu = PVE::Network::read_bridge_mtu($net->{bridge}); >>> >>> - if (!defined($mtu) || $mtu == 1) { >>> + if ($host_mtu_migration) { >> >> and this if here could be combined? > > How? You mean setting $mtu = $host_mtu_migration; early if there is a > non-zero value? _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel