Re: [PATCH v3 00/10] rust: pci: add abstractions for SR-IOV capability
Leon Romanovsky <[email protected]> Wed, 4 Mar 2026 10:47:50 +0200
| Newsgroups | org.kernel.vger.linux-fpga,dev.linux.lists.driver-core,org.freedesktop.lists.dri-devel,org.freedesktop.lists.nouveau,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <20260304084750.GW12611@unreal> |
On Tue, Mar 03, 2026 at 04:15:20PM -0500, Peter Colberg wrote: > Add Rust abstractions for the Single Root I/O Virtualization (SR-IOV) > capability of a PCI device. Provide a minimal set of wrappers for the > SR-IOV C API to enable and disable SR-IOV for a device, and query if > a PCI device is a Physical Function (PF) or Virtual Function (VF). <...> > For PF drivers written in C, disabling SR-IOV on remove() may be opted > into by setting the flag managed_sriov in the pci_driver structure. For > PF drivers written in Rust, disabling SR-IOV on unbind() is mandatory. Why? Could you explain the rationale behind this difference between C and Rust? Let me remind you that SR‑IOV devices which do not disable VFs do so for a practical and well‑established reason: maximizing hardware utilization. Thanks