ice_adapter_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ice_adapter_get β€” bestie edition πŸ’–

okay so this is ice_adapter_get(9) from the Kernel API Manual, and honestly? it's a little baddie of a function that just hands you a pointer to a shared thing. let's get into it 🫢


✨ NAME ✨

ice_adapter_get β€” literally just: get a shared ice_adapter structure. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

struct ice_adapter * ice_adapter_get (struct pci_dev *pdev );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • pdev β€” pointer to the pci_dev whose driver is the one getting the ice_adapter. it's giving "hey bestie, which device are you?" energy πŸ’…

πŸ‘‘ DESCRIPTION πŸ‘‘

so what does it actually do? it gets you a pointer to a shared ice_adapter structure. no cap, that's it.

here's the tea though: Physical functions (PFs) of the same multi-function PCI device all share one ice_adapter structure. one adapter, many PFs, all vibing together ✨

and because sharing means caring, the ice_adapter is reference-counted. that means the PF driver must use ice_adapter_put to release its reference. like, you grab it, you put it back. periodt. πŸ”₯

not releasing your reference with ice_adapter_put is not the move, bestie β€” that reference count is not gonna untangle itself 😭

🧚 CONTEXT 🧚

Process, may sleep. so it's a chill, sleepable context β€” no need to panic about atomics here πŸ’œ


⭐ RETURN ⭐

  • on success β€” pointer to ice_adapter. iconic. we love to see it 🌈
  • on error β€” ERR_PTR. and the only possible error is -ENOMEM. that's the entire error menu, fr fr πŸ’€

πŸ“ SEE ALSO πŸ“

  • Kernel file ./drivers/net/ethernet/intel/ice/ice_adapter.c β€” go read the source, iykyk πŸ‘€
  • ice_adapter_put(9) β€” the partner in crime, the other half of the refcount story 🫢

and that's the whole page, bestie β€” no notes, ate and left no crumbs πŸ’–βœ¨

sign-off szn: this one lives under ./drivers/net/ethernet/intel/ice, dated October 2026, and it's the ice_adapter_get(9) page β€” mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from