public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH network] fix #6806: sdn: allow nic* and if* interfaces as bridge ports
Date: Mon, 15 Sep 2025 12:51:21 +0200	[thread overview]
Message-ID: <kwtbzrua2xsh7fpuw6zmoyozccqxlrmtzeh4ubax6x53cyh2sz@qukb6uowsce4> (raw)
In-Reply-To: <5711a326-c8e5-4f7d-a374-ea02f1fbb411@proxmox.com>

On 15.09.2025 12:42, Thomas Lamprecht wrote:
>Am 15.09.25 um 10:48 schrieb Gabriel Goller:
>> When creating a vlan zone and vnet, we get all the bridge interfaces
>> (slaves) and add them to the new vlan bridge. We get all the bridge
>> interfaces using `/sys/class/net` and then filter them using a regex.
>> This regex was missing the new `if` and `nic` prefixes which were
>> introduced with the pve-network-interface-pinning tool.
>>
>> This is more of a stop-gap, we can probably remove the regex completely
>> as I don't see any reason to filter by "physical" interfaces here. If
>> there is a need, we can still run `ip link` and check the attributes
>> with `PVE::Network::ip_link_is_physical`.
>
>We allow bond already now though, so replacing the current check with the
>ip_link_is_physical would not really be an option FWICT.

Ah yeah true.

>Reversing the regex to filter out stuff that quite definitively does not
>make sense might be a better approach, like:
>
>^(?!((fw(br|pr|ln)|tap|veth)\d+((p|i)\d+)?))
>
>But really not that much more maintainable ;-) So even if it should result
>in the same list, it might be better to replace dir_glob_foreach with
>"manually" doing the loop here and use dedicated simple "next if expression"
>checks to skip the interfaces that cannot make sense.
>
>But your stop gap is already improving the status quo, so it's fine to
>apply this patch here now already.

Agree.
I'll discuss with Stefan later (he's on vacation this week) if we can
remove this altogether.



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2025-09-15 10:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-15  8:47 Gabriel Goller
2025-09-15 10:42 ` Thomas Lamprecht
2025-09-15 10:51   ` Gabriel Goller [this message]
2025-09-16 10:10 ` [pve-devel] applied: " Thomas Lamprecht

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=kwtbzrua2xsh7fpuw6zmoyozccqxlrmtzeh4ubax6x53cyh2sz@qukb6uowsce4 \
    --to=g.goller@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@proxmox.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