public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: "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: Wed, 14 Oct 2026 11:40:48 +0200	[thread overview]
Message-ID: <as9M7rcOAFW8DENq@luna.proxmox.com> (raw)
In-Reply-To: <20261013095852.2586609-1-remi.paeta@comaite.com>

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).

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`).

@Fiona what do you think? :)




      reply	other threads:[~2026-10-14  9:40 UTC|newest]

Thread overview: 2+ 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 [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=as9M7rcOAFW8DENq@luna.proxmox.com \
    --to=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