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 E05361FF15C for ; Wed, 5 Mar 2025 09:29:12 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5B68BEFB8; Wed, 5 Mar 2025 09:29:07 +0100 (CET) Date: Wed, 5 Mar 2025 09:28:34 +0100 From: Gabriel Goller To: Stefan Hanreich Message-ID: <7w2ow7ysmtkwpiqhfqnzcyz6d72alcyhaqfsy3zvari2wpfqyq@jg2yixacbg2l> Mail-Followup-To: Stefan Hanreich , Proxmox VE development discussion References: <20250214133951.344500-1-g.goller@proxmox.com> <20250214133951.344500-2-g.goller@proxmox.com> <32b866b7-6faa-4fb3-98ce-3333ceab14e1@proxmox.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <32b866b7-6faa-4fb3-98ce-3333ceab14e1@proxmox.com> User-Agent: NeoMutt/20241002-35-39f9a6 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.029 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 Subject: Re: [pve-devel] [PATCH proxmox-ve-rs 01/11] add crate with common network types X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Cc: Proxmox VE development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On 03.03.2025 16:08, Stefan Hanreich wrote: >Maybe we should think about internally representing the Network Entity >Title and its parts as bytes rather than strings? So [u8; n]? Since in >practice it's exactly that. I think this would simplify a lot of the >methods here, and obsolete some stuff like e.g. length validation. I've >noted some parts below where I think we could benefit from that. > >We could also provide conversion methods for MAC addresses easily then, >although IP addresses might be a bit awkward since they map to network >entity titles as binary-coded decimal and there's no std support for >that so we'd have to brew our own conversions... > >Also, theoretically, the Area ID is of variable length, but for our use >case the current additional constraints are fine imo and not worth the >hassle of implementing variable length Area IDs. Might be good to note >this though. Just to keep the mailing list in the loop: We discussed this offlist a bit and turns out it's a little bit tricky as some sections (systemid especially) have a weird length (not a power of two). This makes the whole handling a bit weird and we're probably not gonna gain any performance here anyway. So this is something to maybe revisit later. The hex-part is still valid though, will fix that for the next version! _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel