STRUCT DEV_PRIV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct dev_priv(9) β€” the Kernel API Manual glow-up

okay so bestie, we're in the Kernel API Manual today and the star of the show is struct dev_priv(9). this is the network device private data structure β€” the little locker where a network device keeps all its own secrets. πŸŽ€


✨ NAME ✨

struct dev_priv β€” Network device private data structure. yes. that's the whole vibe. it holds the private data. slay. πŸ’–


🌸 SYNOPSIS 🌸

struct dev_priv {
    struct dev_info *adapter;
    struct ksz_port port;
    struct ksz_timer_info monitor_timer_info;
    struct semaphore proc_sem;
    int id;
    struct mii_if_info mii_if;
    u32 advertising;
    u32 msg_enable;
    int media_state;
    int multicast;
    int promiscuous;
 };

lowkey iconic struct layout, no notes. 🫢


πŸ¦‹ Members πŸ¦‹

here's the tour, one field at a time, iykyk:

  • adapter β€” Adapter device information. the parent-energy field fr fr.
  • port β€” Port information. all the port lore lives right here.
  • monitor_timer_info β€” Timer to monitor ports. it's giving "i watch you while you sleep" but make it kernel-friendly. ⏰
  • proc_sem β€” Semaphore for proc accessing. the bouncer at the proc club. you shall not pass (without the semaphore). πŸ’…
  • id β€” Device ID. everyone needs an ID bestie.
  • mii_if β€” MII interface information. yes MII, not me. 🌸
  • advertising β€” Temporary variable to store advertised settings. temporary! like my attention span for anything that isn't Unix.
  • msg_enable β€” The message flags controlling driver output. this is the volume knob for the driver's yapping. πŸ”₯
  • media_state β€” The connection status of the device. are we connected or are we not, that is the question.
  • multicast β€” The all multicast state of the device.
  • promiscuous β€” The promiscuous state of the device. πŸ‘€ that's the field name. that's just what it's called. i don't make the rules.

🌈 SEE ALSO 🌈

the whole friend group shows up here, and honestly? respect the networking. the source of all this magic lives in the kernel file ./drivers/net/ethernet/micrel/ksz884x.c.

the structs:

  • struct ksz_hw_desc(9)
  • struct ksz_sw_desc(9)
  • struct ksz_dma_buf(9)
  • struct ksz_desc(9)
  • struct ksz_desc_info(9)
  • struct ksz_mac_table(9)
  • struct ksz_vlan_table(9)
  • struct ksz_port_mib(9)
  • struct ksz_port_cfg(9)
  • struct ksz_switch(9)
  • struct ksz_port_info(9)
  • struct ksz_hw(9)
  • struct ksz_port(9)
  • struct ksz_timer_info(9)
  • struct ksz_shared_mem(9)
  • struct ksz_counter_info(9)
  • struct dev_info(9)

the hw / sw helpers:

the phy / eeprom / link squad:

the wake-on-lan crew:

the hw lifecycle besties:

the timer + descriptor + memory girlies:

the tx / rx pipeline:

the ethtool-adjacent icons:

like i said. the whole group chat got added. not one person left on read. πŸ’€βœ¨


ngl bestie, if you got this far you basically main-character'd your way through every reference in ksz884x.c. πŸ†

and that's the page! brought to you by ./drivers/net/ethernet/micrel, dated October 2026, straight out of the Kernel API Manual β€” bye bestie, go read some descriptors πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from