PCI_IOV_UNINIT(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… PCI_IOV_UNINIT πŸ’…

okay so bestie, welcome to the pci(9) corner of the kernel β€” this one's from the Kernel Developer's Manual, and it's all about turning SR-IOV off on a PF device. no cap, it's a short one, but it matters. 🫢


✨ NAME ✨

PCI_IOV_UNINIT β€” disable SR-IOV on a PF device


🌸 SYNOPSIS 🌸

#include <sys/bus.h>
#include <dev/pci/pci_iov.h>

void
PCI_IOV_UNINIT(device_t dev);

πŸ¦‹ DESCRIPTION πŸ¦‹

So the PCI_IOV_UNINIT() method gets called by the PCI Single-Root I/O Virtualization (SR-IOV) infrastructure when the user asks for SR-IOV to be disabled on a Physical Function (PF). πŸ’€ Like, the user said "turn it off" and the infra is like "bet, calling your driver now."

When this method fires, the PF driver must:

  • release any SR-IOV-related resources it has allocated, and
  • disable any device-specific SR-IOV configuration in the device.

Both. Not one. Both. πŸ‘‘

⚠️ Important vibe check: this method will only be called following a successful call to PCI_IOV_INIT(9). So don't be out here expecting it out of nowhere.

And another thing β€” it is not guaranteed that PCI_IOV_ADD_VF(9) will have been called for any Virtual Function (VF) after the call to PCI_IOV_INIT(9) and before the call to PCI_IOV_UNINIT. So like, don't assume any VFs actually showed up in between. 😭 Plan accordingly.


πŸŽ€ SEE ALSO πŸŽ€


πŸ‘‘ AUTHORS πŸ‘‘

This manual page was written by Ryan Stone <rstone@FreeBSD.org>. ty bestie for the docs 🫢


✨ and that's the whole page, bestie β€” slay responsibly ✨

Debian, May 28, 2015 β€” PCI_IOV_UNINIT(9), signing off πŸ’œ

πŸ“¦ where this page comes from