STRUCT ICE_ADAPTER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

ok so welcome to the Kernel API Manual, bestie β€” this page is all about struct ice_adapter, which is literally the PCI adapter resources that get shared across PFs. shared!! across PFs!! the way that one struct is carrying the whole squad 🫢


✨ SYNOPSIS ✨

here's the whole vibe, copy-pasted exactly because you KNOW we don't mess with code:

struct ice_adapter {
    refcount_t refcount;
    spinlock_t ptp_gltsyn_time_lock;
    spinlock_t txq_ctx_lock;
    struct mutex cpi_phy_lock[ICE_E825_MAX_PHYS];
    struct ice_pf *ctrl_pf;
    struct ice_port_list ports;
    u64 index;
 };

that's it. that's the struct. iconic behavior honestly πŸŽ€


πŸ¦‹ Members πŸ¦‹

okay now let's do a little meet-and-greet with every single field, no skipping, we don't do that here πŸ’–

  • refcount β€” the reference count, ngl. the struct ice_pf objects are the ones holding the references. they're the ones showing up to the party, fr fr.
  • ptp_gltsyn_time_lock β€” a spinlock that protects access to the GLTSYN_TIME register of the PTP clock. it's giving bodyguard energy πŸ”₯
  • txq_ctx_lock β€” another spinlock, this one protecting access to the GLCOMM_QTX_CNTX_CTL register. yes bestie, another one. we stay protected πŸ’…
  • cpi_phy_lock β€” per-PHY mutex that serializes CPI REQ/ACK transactions, and it's an array of ICE_E825_MAX_PHYS of them. index 0 = PHY0, index 1 = PHY1. used on E825C devices. very demure, very per-PHY 🌸
  • ctrl_pf β€” the control PF of the adapter. the main character, lowkey πŸ‘‘
  • ports β€” the ports list. a whole list!! of ports!!
  • index β€” a 64-bit index that's cached for collision detection on 32bit systems. it's literally just sitting there being 64-bit so 32bit systems don't get confused 😭

🌈 SEE ALSO 🌈

if you wanna keep reading (and you should, bestie, we're obsessed with documentation):

  • Kernel file ./drivers/net/ethernet/intel/ice/ice_adapter.h β€” and also struct ice_port_list(9), go say hi πŸ¦‹
literally go read the header file. iykyk. no cap, it's right there in the source tree ✨

and that's the whole page!! this little writeup came from ./drivers/net/ethernet/intel/ice, dated October 2026 β€” slay, you made it to the end, periodt πŸŽ€πŸ’œ bye bestie!!

πŸ“¦ where this page comes from