All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhi Wang <zhiw@nvidia.com>
To: Alexandre Courbot <acourbot@nvidia.com>
Cc: <rust-for-linux@vger.kernel.org>, <linux-pci@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <dakr@kernel.org>,
	<aliceryhl@google.com>, <bhelgaas@google.com>,
	<kwilczynski@kernel.org>, <ojeda@kernel.org>, <boqun@kernel.org>,
	<gary@garyguo.net>, <bjorn3_gh@protonmail.com>,
	<lossin@kernel.org>, <a.hindborg@kernel.org>, <tmgross@umich.edu>,
	<markus.probst@posteo.de>, <cjia@nvidia.com>, <smitra@nvidia.com>,
	<ankita@nvidia.com>, <aniketa@nvidia.com>, <kwankhede@nvidia.com>,
	<targupta@nvidia.com>, <kjaju@nvidia.com>, <alkumar@nvidia.com>,
	<joelagnelf@nvidia.com>, <jhubbard@nvidia.com>,
	<zhiwang@kernel.org>, <daniel.almeida@collabora.com>,
	<tamird@kernel.org>, <work@onurozkan.dev>
Subject: Re: [PATCH v8 1/1] rust: pci: add extended capability and SR-IOV support
Date: Wed, 26 Aug 2026 14:33:33 +0300	[thread overview]
Message-ID: <20260826143333.5c911b55@inno-dell> (raw)
In-Reply-To: <DKYU6ELNN060.154BHE2QG442C@nvidia.com>

On Wed, 26 Aug 2026 20:24:52 +0900
"Alexandre Courbot" <acourbot@nvidia.com> wrote:

snip

> > +impl ExtCapId {
> > +    /// Single Root I/O Virtualization.
> > +    // CAST: PCI extended capability IDs are 16-bit values defined
> > by the PCIe specification.
> > +    pub const SRIOV: Self = Self(bindings::PCI_EXT_CAP_ID_SRIOV as
> > u16);
> 
> Coming back to comment on the conclusion: we have settled on a
> solution [1] to handle this nicely, but it is likely that your series
> will land before it. So meanwhile, please use the turbofish solution
> that I initially proposed:
> 
>     pub const SRIOV: Self = Self(casts::u32_into_u16::<{
> bindings::PCI_EXT_CAP_ID_SRIOV }>());
> 
> While it's a mouthful, [1] does remove `u32_into_u16`, which means we
> won't miss it and will need to update the code to use `const_as!` when
> applying.
> 

Thanks, I will address all the comments and re-spin it today. 

> [1]
> https://lore.kernel.org/all/20260825-const_as-v1-1-1ce712225fe2@nvidia.com/
> 


      parent reply	other threads:[~2026-08-26 11:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18  8:46 [PATCH v8 0/1] Rust PCI capability infrastructure and SR-IOV support Zhi Wang
2026-08-18  8:46 ` [PATCH v8 1/1] rust: pci: add extended capability " Zhi Wang
2026-08-18  8:55   ` sashiko-bot
2026-08-24  8:12   ` Alexandre Courbot
2026-08-24 10:48     ` Gary Guo
2026-08-24 11:14       ` Alexandre Courbot
2026-08-24 11:59         ` Gary Guo
2026-08-24 15:21           ` Alexandre Courbot
2026-08-24 15:46             ` Gary Guo
2026-08-24 16:25               ` Gary Guo
2026-08-25  2:57                 ` Alexandre Courbot
2026-08-24 11:38     ` Danilo Krummrich
2026-08-26 11:24   ` Alexandre Courbot
2026-08-26 11:32     ` Danilo Krummrich
2026-08-26 11:44       ` Miguel Ojeda
2026-08-26 13:36         ` Danilo Krummrich
2026-08-26 14:09           ` Miguel Ojeda
2026-08-26 13:32       ` Alexandre Courbot
2026-08-26 11:33     ` Zhi Wang [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=20260826143333.5c911b55@inno-dell \
    --to=zhiw@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=alkumar@nvidia.com \
    --cc=aniketa@nvidia.com \
    --cc=ankita@nvidia.com \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=cjia@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=gary@garyguo.net \
    --cc=jhubbard@nvidia.com \
    --cc=joelagnelf@nvidia.com \
    --cc=kjaju@nvidia.com \
    --cc=kwankhede@nvidia.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=markus.probst@posteo.de \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=smitra@nvidia.com \
    --cc=tamird@kernel.org \
    --cc=targupta@nvidia.com \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    --cc=zhiwang@kernel.org \
    /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.