From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 151B41FF140 for ; Fri, 27 Mar 2026 01:36:52 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 082AC1ED3C; Fri, 27 Mar 2026 01:37:12 +0100 (CET) Message-ID: <56b2e1b3-afcc-44aa-93fc-0b9afa89730e@proxmox.com> Date: Fri, 27 Mar 2026 01:37:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH proxmox-ve-rs v7 05/21] frr: add template serializer and serialize fabrics using templates To: Gabriel Goller , pve-devel@lists.proxmox.com References: <20260323134934.243110-1-g.goller@proxmox.com> <20260323134934.243110-6-g.goller@proxmox.com> Content-Language: en-US From: Thomas Lamprecht In-Reply-To: <20260323134934.243110-6-g.goller@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774571778184 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.011 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: ALMDN6I273I66GTG7IZ63CYNJQF2MHFN X-Message-ID-Hash: ALMDN6I273I66GTG7IZ63CYNJQF2MHFN X-MailFrom: t.lamprecht@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: > +++ b/proxmox-frr/src/ser/openfabric.rs > +impl std::fmt::Display for OpenfabricRouterName { > + fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { > + self.0.fmt(f) This calls Debug::fmt now, since FrrWord's Display impl was removed earlier in this patch. Result: format!("{}", name) gives FrrWord("fabric1") instead of "fabric1". The old code was `write!(f, "openfabric {}", self.0)` which used FrrWord's Display (just the inner string). Now that Display is gone, self.0.fmt(f) resolves to Debug::fmt. Templates use Serialize so config generation isn't affected, but anything using Display (logging, errors) gets garbage. Simplest fix: use write!(f, "{}", self.0.as_ref()) or re-add a trivial Display to FrrWord. > +++ b/proxmox-frr/src/ser/route_map.rs > +#[serde(tag = "protocol_type")] > +pub enum RouteMapMatch { > + #[serde(rename = "ip")] > + V4(RouteMapMatchInner), > + #[serde(rename = "ipv6")] > + V6(RouteMapMatchInner), > + #[serde(rename = "vni")] > + Vni(u32), #[serde(tag = "...")] (internally tagged) on a variant wrapping a bare u32 cannot really work as serde can't inject the tag field into a primitive. This will panic at serialization time IIRC. btw. The variant also has no corresponding branch in route_maps.jinja (just in case I forget to write it there). Since it's unreachable from the Perl side today, nothing is broken, but if it's not needed then I'd suggest removing it until fully wired up, or switching to Vni(VniMatch) (the struct already exists) (and adding a template branch in the jinja template). > +pub enum SetIpNextHopValue { > +pub enum SetTagValue { > +pub struct VniMatch { These three types plus AccessList and PrefixList (the wrapper structs) seem to be unused - FrrConfig uses BTreeMap> directly now.