From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 1BB551FF15E for <inbox@lore.proxmox.com>; Tue, 11 Feb 2025 13:45:20 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2F6392C1E9; Tue, 11 Feb 2025 13:45:16 +0100 (CET) Mime-Version: 1.0 Date: Tue, 11 Feb 2025 13:45:12 +0100 Message-Id: <D7PMKAGM4YFP.KL69Q8B9ZZ9F@proxmox.com> From: "Christoph Heiss" <c.heiss@proxmox.com> To: "Dominik Csapak" <d.csapak@proxmox.com> X-Mailer: aerc 0.20.0 References: <20250120145203.282363-1-d.csapak@proxmox.com> <20250120145203.282363-6-d.csapak@proxmox.com> In-Reply-To: <20250120145203.282363-6-d.csapak@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.028 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 qemu-server v5 02/11] pci: mapping: move implementation of find_on_current_node here X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> On Mon Jan 20, 2025 at 3:51 PM CET, Dominik Csapak wrote: [..] > +my sub get_current_node_mapping { > + my ($mapping_config, $mapping_name) = @_; > + > + my $node = PVE::INotify::nodename(); > + my $devices = PVE::Mapping::PCI::get_node_mapping($mapping_config, $mapping_name, $node); > + die "PCI device mapping not found for '$mapping_name'\n" if !$devices || !scalar($devices->@*); > + > + return $devices; > +} > + > # returns the parsed pci config but parses the 'host' part into > # a list if lists into the 'id' property like this: > # > @@ -429,8 +440,8 @@ sub parse_hostpci { > > if ($mapping) { > # we have no ordinary pci id, must be a mapping > - my $devices = PVE::Mapping::PCI::find_on_current_node($mapping); > - die "PCI device mapping not found for '$mapping'\n" if !$devices || !scalar($devices->@*); > + my $config = PVE::Mapping::PCI::config(); Nit: Maybe move this line into get_current_node_mapping() too, much like is done in the previous patch for PVE::QemuServer::USB? Would be nice from a consistency point-of-view. > + my $devices = get_current_node_mapping($config, $mapping); _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel