public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: Stefan Hanreich <s.hanreich@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH proxmox-perl-rs 06/15] pve-rs: fabrics: assign network interfaces to configured VRFs
Date: Fri, 23 Oct 2026 11:33:26 +0200	[thread overview]
Message-ID: <atspNNSMmYl88Eoj@luna.proxmox.com> (raw)
In-Reply-To: <85270a59-b3f8-4c23-868b-56c4dd5d0302@proxmox.com>

On 21.10.2026 18:14, Stefan Hanreich wrote:
> On 8/21/26 4:04 PM, Gabriel Goller wrote:
> > Add the VRF stanza to generated interface configuration when a fabric
> > has a VRF. Apply it to dummy addresses, protocol interfaces, and BGP
> > unnumbered interfaces so traffic enters the correct routing table.
> > 
> > Fabrics without a VRF keep their existing configuration.
> > 
> > Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
> > ---
> >  pve-rs/src/bindings/sdn/fabrics.rs | 69 +++++++++++++++++++++++-------
> >  1 file changed, 53 insertions(+), 16 deletions(-)
> > 
> > diff --git a/pve-rs/src/bindings/sdn/fabrics.rs b/pve-rs/src/bindings/sdn/fabrics.rs
> > index f96b6b1c656f..98470eeaa397 100644
> > --- a/pve-rs/src/bindings/sdn/fabrics.rs
> > +++ b/pve-rs/src/bindings/sdn/fabrics.rs
> > @@ -582,8 +582,23 @@ pub mod pve_rs_sdn_fabrics {
> >          Ok(interface)
> >      }
> >  
> > +    pub(crate) fn fabric_vrf_name(fabric: &FabricEntry) -> Option<String> {
> > +        let zone = match fabric {
> > +            FabricEntry::Ospf(entry) => entry.fabric_section().properties().zone(),
> > +            FabricEntry::Bgp(entry) => entry.fabric_section().properties().zone(),
> > +            FabricEntry::Openfabric(_) | FabricEntry::WireGuard(_) => None,
> > +        };
> > +
> > +        zone.map(|zone| format!("vrf_{zone}"))
> > +    }
> > +
> 
> nit: maybe better as a method on the fabric config itself? Although I suppose it could be
> argued that it's not the decision of the config how the VRF should be named.

Makes sense, done.

Thanks for the review!

> >      /// Helper function to generate the default `/etc/network/interfaces` config for a given CIDR.
> > -    fn render_interface(name: &str, cidr: Cidr, link_type: Option<&str>) -> Result<String, Error> {
> > +    fn render_interface(
> > +        name: &str,
> > +        cidr: Cidr,
> > +        link_type: Option<&str>,
> > +        vrf: Option<&str>,
> > +    ) -> Result<String, Error> {
> >          let mut interface = String::new();
> >  
> >          writeln!(interface, "auto {name}")?;
> > @@ -595,6 +610,9 @@ pub mod pve_rs_sdn_fabrics {
> >          if let Some(link_type) = link_type {
> >              writeln!(interface, "\tlink-type {link_type}")?;
> >          }
> > +        if let Some(vrf) = vrf {
> > +            writeln!(interface, "\tvrf {vrf}")?;
> > +        }
> >          writeln!(interface, "\tip-forward 1")?;
> >  
> >          Ok(interface)
> > [snip]




  reply	other threads:[~2026-10-23  9:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 14:03 [RFC manager/network/proxmox{-ve-rs,-perl-rs} 00/15] SDN VRF support Gabriel Goller
2026-08-21 14:03 ` [PATCH proxmox-ve-rs 01/15] frr: add VRF-aware OSPF rendering Gabriel Goller
2026-08-21 14:03 ` [PATCH proxmox-ve-rs 02/15] sdn: add zone references to OSPF and BGP fabrics Gabriel Goller
2026-08-21 14:03 ` [PATCH proxmox-ve-rs 03/15] sdn: generate fabric routing configuration in zone VRFs Gabriel Goller
2026-10-21 16:14   ` Stefan Hanreich
2026-10-23  8:57     ` Gabriel Goller
2026-08-21 14:03 ` [PATCH proxmox-ve-rs 04/15] sdn: fix VRF route-map scoping and zone ID validation Gabriel Goller
2026-08-21 14:03 ` [PATCH proxmox-ve-rs 05/15] tests: fabrics: add test for fabrics in VRFs Gabriel Goller
2026-08-21 14:03 ` [PATCH proxmox-perl-rs 06/15] pve-rs: fabrics: assign network interfaces to configured VRFs Gabriel Goller
2026-10-21 16:14   ` Stefan Hanreich
2026-10-23  9:33     ` Gabriel Goller [this message]
2026-08-21 14:03 ` [PATCH proxmox-perl-rs 07/15] pve-rs: fabrics: make per-fabric status queries VRF-aware Gabriel Goller
2026-10-21 16:14   ` Stefan Hanreich
2026-10-23 11:29     ` Gabriel Goller
2026-08-21 14:03 ` [PATCH proxmox-perl-rs 08/15] pve-rs: fabrics: include VRF routes in aggregate status Gabriel Goller
2026-08-21 14:03 ` [PATCH pve-network 09/15] sdn: add optional VRFs for simple zones Gabriel Goller
2026-08-21 14:03 ` [PATCH pve-network 10/15] sdn: allow fabrics to use simple zone VRFs Gabriel Goller
2026-08-21 14:03 ` [PATCH pve-network 11/15] sdn: always generate EVPN " Gabriel Goller
2026-08-21 14:03 ` [PATCH pve-network 12/15] api: sdn: allow EVPN zones as fabric VRFs Gabriel Goller
2026-08-21 14:03 ` [PATCH pve-network 13/15] api: sdn: disallow BGP fabrics in EVPN zone VRFs Gabriel Goller
2026-08-21 14:03 ` [PATCH pve-manager 14/15] ui: sdn: add VRF zone selection for fabrics Gabriel Goller
2026-08-21 14:03 ` [PATCH pve-manager 15/15] ui: sdn: expose EVPN zones as fabric VRFs Gabriel Goller
2026-10-21  9:38 ` [RFC manager/network/proxmox{-ve-rs,-perl-rs} 00/15] SDN VRF support Gabriel Goller
2026-10-21 16:13 ` Stefan Hanreich
2026-10-23 16:55   ` Gabriel Goller
  -- strict thread matches above, loose matches on Subject: below --
2026-10-21  9:36 [PATCH " Gabriel Goller
2026-10-21  9:36 ` [PATCH proxmox-perl-rs 06/15] pve-rs: fabrics: assign network interfaces to configured VRFs Gabriel Goller

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=atspNNSMmYl88Eoj@luna.proxmox.com \
    --to=g.goller@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.hanreich@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