all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Dominik Csapak <d.csapak@proxmox.com>
Subject: [pve-devel] applied: [PATCH manager v2] api/ui: improve mdev listing for pci mappings
Date: Wed, 30 Oct 2024 10:48:42 +0100	[thread overview]
Message-ID: <9e4e18e9-42d3-4a86-b676-7cd85cb39925@proxmox.com> (raw)
In-Reply-To: <20241030085944.1019813-1-d.csapak@proxmox.com>

Am 30/10/2024 um 09:59 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.
> 
> Rename also the parameter to better reflect what it is. This is OK here,
> because it's a parameter that's deduced via the url path, and any
> attempt to include the parameter with a name manually will result in an
> error:
> 
>   duplicate parameter (already defined in URI) with conflicting values!
> 
> Since we cannot reach the api handler without giving the parameter
> already via the url, there is no way to give it via name.
> 
> 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>
> ---
> changes since v1:
> * improved commit message to tell why it's ok to rename the parameter
>   here and still have backwards compatibility.
> 
>  PVE/API2/Hardware/PCI.pm     | 45 +++++++++++++++++++++++++++++-------
>  www/manager6/qemu/PCIEdit.js | 12 +---------
>  2 files changed, 38 insertions(+), 19 deletions(-)
> 
>

applied, thanks!

FYI: I fleeced in a small change for s/pciid/pci-id/ for slightly improve
readability while this name was touched anyway.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


      reply	other threads:[~2024-10-30  9:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30  8:59 [pve-devel] " Dominik Csapak
2024-10-30  9:48 ` Thomas Lamprecht [this message]

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=9e4e18e9-42d3-4a86-b676-7cd85cb39925@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal