public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: "Gabriel Goller" <g.goller@proxmox.com>,
	"Rémi PAETA" <remi.paeta@comaite.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu-server] fix #6490: network: add bridge fdb entries when hotplugging a nic
Date: Thu, 29 Oct 2026 16:27:09 +0100	[thread overview]
Message-ID: <5156a6ff-0cad-4589-a523-34590ca7f6f6@proxmox.com> (raw)
In-Reply-To: <as9M7rcOAFW8DENq@luna.proxmox.com>

Am 14.10.26 um 11:40 AM schrieb Gabriel Goller:
> On 13.10.2026 11:58, Rémi PAETA wrote:
>> [snip]
>> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
>> index 74772fdd..4c2bd334 100644
>> --- a/src/PVE/QemuServer.pm
>> +++ b/src/PVE/QemuServer.pm
>> @@ -5126,6 +5126,8 @@ sub vmconfig_update_net {
>>                      $newnet->{trunks},
>>                      $newnet->{rate},
>>                  );
>> +                # unplugging the interface dropped its forwarding database entries
>> +                PVE::QemuServer::Network::add_nets_bridge_fdb({ $opt => $value }, $vmid);
>>  
>>              } elsif (safe_num_ne($oldnet->{rate}, $newnet->{rate})) {
>>                  # Rate can be applied on its own but any change above needs to
>> @@ -5155,6 +5157,7 @@ sub vmconfig_update_net {
>>              $newnet->{bridge}, $newnet->{macaddr}, $vmid, $conf->{name},
>>          );
>>          vm_deviceplug($storecfg, $conf, $vmid, $opt, $newnet, $arch, $machine_type);
>> +        PVE::QemuServer::Network::add_nets_bridge_fdb({ $opt => $value }, $vmid);
>>      } else {
>>          die "skip\n";
>>      }
> 
> Not a qemu-server expert, but one thing I noticed:
> 
> I think we need an eval around the two calls, otherwise when the `bridge fdb
> add` fails, the tap interface is created but the hotplug fails (which means we
> have a diverging config).

Yes, I think it's preferable to only warn about failure here, while
still proceeding, so that the VM config is updated.

> I think we also should relax a bit the del_nets_bridge_fdb() function so that a
> missing entry doesn't die (again add an eval around the `bridge fdb del`).

Sounds good to me too :)

> @Fiona what do you think? :)




      reply	other threads:[~2026-10-29 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13  9:58 [PATCH qemu-server] fix #6490: network: add bridge fdb entries when hotplugging a nic Rémi PAETA
2026-10-14  9:40 ` Gabriel Goller
2026-10-29 15:27   ` Fiona Ebner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5156a6ff-0cad-4589-a523-34590ca7f6f6@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=g.goller@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=remi.paeta@comaite.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal