From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager 1/1] api/ui: improve mdev listing for pci mappings
Date: Thu, 24 Oct 2024 18:53:50 +0200 [thread overview]
Message-ID: <e51c146a-321c-4408-8956-094d0d5f37f1@proxmox.com> (raw)
In-Reply-To: <20240806122203.2266054-7-d.csapak@proxmox.com>
Am 06/08/2024 um 14:22 schrieb Dominik Csapak:
> currently when we have a pci resource mapping, we manually check only
> the available models for the first pci entry. This often works, but not
> always, since one could have completely different devices in one
> mapping, or with the new nvidia sysfs api we don't get the generally
> available models.
>
> To improve this, extend the 'pciid' regex to include pciids or mapping
> names, and for mappings, iterate over all local pci devices in it and
> extract the mdev types.
>
> This also vastly simplifies the ui code, since we only have to give the
> mapping to the selector instead of an (arbitrarily selected) pci id.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> PVE/API2/Hardware/PCI.pm | 45 +++++++++++++++++++++++++++++-------
> www/manager6/qemu/PCIEdit.js | 12 +---------
> 2 files changed, 38 insertions(+), 19 deletions(-)
>
> diff --git a/PVE/API2/Hardware/PCI.pm b/PVE/API2/Hardware/PCI.pm
> index a3a689bf..7135a605 100644
> --- a/PVE/API2/Hardware/PCI.pm
> +++ b/PVE/API2/Hardware/PCI.pm
> @@ -135,7 +135,7 @@ __PACKAGE__->register_method ({
>
> __PACKAGE__->register_method ({
> name => 'pciindex',
> - path => '{pciid}',
> + path => '{pciid-or-mapping}',
> method => 'GET',
> description => "Index of available pci methods",
> permissions => {
> @@ -145,9 +145,9 @@ __PACKAGE__->register_method ({
> additionalProperties => 0,
> properties => {
> node => get_standard_option('pve-node'),
> - pciid => {
> + 'pciid-or-mapping' => {
While in general this should be fine w.r.t. breaking changes for the API itself,
as the name of those template-variables from the API path can be basically seen
as internal detail, it would IMO be warranted to state that explicitly in the
commit message, as FWICT this is basically the only time where changing the
parameter name mid-release is legit without some backward compat handling.
And just to be sure: you are certain that this cannot be passed anyhow else,
e.g. in some CLI (pvesh?) or other way?
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2024-10-24 16:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-06 12:21 [pve-devel] [PATCH common/qemu-server/manager] adapt to nvidia vgpu api changes Dominik Csapak
2024-08-06 12:21 ` [pve-devel] [PATCH common 1/2] SysFSTools: handle new nvidia syfsapi as mdev Dominik Csapak
2024-08-06 12:21 ` [pve-devel] [PATCH common 2/2] SysFSTools: lscpi: move mdev and iommugroup check outside of verbose Dominik Csapak
2024-08-06 12:22 ` [pve-devel] [PATCH qemu-server 1/3] pci: choose devices: don't reserve pciids when vm is already running Dominik Csapak
2024-08-06 12:22 ` [pve-devel] [PATCH qemu-server 2/3] pci: remove pci reservation: optionally give list of ids to remove Dominik Csapak
2024-08-06 12:22 ` [pve-devel] [PATCH qemu-server 3/3] pci: mdev: adapt to nvidia interface with kernel >= 6.8 Dominik Csapak
2024-08-06 12:22 ` [pve-devel] [PATCH manager 1/1] api/ui: improve mdev listing for pci mappings Dominik Csapak
2024-10-24 16:53 ` Thomas Lamprecht [this message]
2024-10-30 8:42 ` Dominik Csapak
2024-10-30 8:46 ` Thomas Lamprecht
2024-10-17 10:16 ` [pve-devel] [PATCH common/qemu-server/manager] adapt to nvidia vgpu api changes Christoph Heiss
2024-10-24 17:06 ` [pve-devel] partially-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=e51c146a-321c-4408-8956-094d0d5f37f1@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pve-devel@lists.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