ice_adapter_get(9)
π 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 thepci_devwhose driver is the one getting theice_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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms