Re: [PATCH v2 5/5] rust: pci: expose the allocated interrupt type
From: Danilo Krummrich
Date: Wed Aug 12 2026 - 13:58:12 EST
On Wed Aug 12, 2026 at 6:44 PM CEST, Gary Guo wrote:
> On Wed Aug 12, 2026 at 12:39 AM BST, Danilo Krummrich wrote:
>> + pub fn irq_type(&self) -> IrqType {
>> + self.reg.irq_type()
>
> Do you expect people to call this on the `IrqVetor` (or even
> `IrqVectorRegistration`)? This is really a property of the device, and not on a
> specific IRQ vector/allocation.
You are not wrong, but the C API sets msix_enabled and msi_enabled in
pci_alloc_irq_vectors() and clears them in pci_free_irq_vectors().
So, if we'd put it on Device<Bound> it'd be a bit of a footgun because it would
potentially yield different results depending on whether it is called before or
after obtaining an IrqVectorRegistration.