STRUCT PSP_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

struct psp_dev β€” the PSP device struct, aka the main character of this whole file πŸ’…

Ok so before we go any further: this page lives in the Kernel API Manual (section 9, kernel API), and it's literally just one struct's whole personality laid out for you. No cap, it's a good one 🫢


🌸 SYNOPSIS 🌸

Here's the whole thing, bestie β€” every field, exactly as it is:

struct psp_dev {
    struct net_device *main_netdev;
    struct list_head assoc_dev_list;
    int assoc_dev_cnt;
    struct psp_dev_ops *ops;
    struct psp_dev_caps *caps;
    void *drv_priv;
    struct mutex lock;
    refcount_t refcnt;
    u32 id;
    u8 generation;
    struct psp_dev_config config;
    struct list_head active_assocs;
    struct list_head prev_assocs;
    struct list_head stale_assocs;
    struct {
      unsigned long rotations;
      unsigned long stales;
    } stats;
    struct rcu_head rcu;
 };

Like… she's structured. She's organized. She has range πŸ”₯


πŸŽ€ MEMBERS πŸŽ€

Time for the roll call, one field at a time πŸ‘‘

  • main_netdev β€” the original netdevice of this PSP device. The O.G. netdev, basically 🌈
  • assoc_dev_list β€” the list of psp_assoc_dev entries that are associated with this PSP device. It's giving friend group energy πŸ‘―
  • assoc_dev_cnt β€” how many entries are actually chillin' in assoc_dev_list. Just a count, but an important one πŸ’–
  • ops β€” the driver callbacks. The driver's whole to-do list 🎯
  • caps β€” the device capabilities. What she can do, periodt ✨
  • drv_priv β€” a driver priv pointer. The driver's own lil private corner πŸ™ˆ
  • lock β€” the instance lock, and it protects all fields. All of them. No exceptions. Respect the lock, fr fr πŸ”’
  • refcnt β€” the reference count for the instance. Classic "how many people are holding onto me" situation πŸ’€
  • id β€” the instance id 🏷️
  • generation β€” the current generation of the device key. She evolves πŸ¦‹
  • config β€” the current device configuration. Her settings era πŸŽ€
  • active_assocs β€” the list of registered associations πŸ’«
  • prev_assocs β€” associations that use the old device key β€” but PSA: old here means still usable, so don't come for them 😌
  • stale_assocs β€” associations whose key got rotated out. Rotated out = done-zo, no keys left πŸ’€
  • stats β€” statistics maintained by the core πŸ“Š
  • stats.rotations β€” see the stats attr key-rotations πŸ‘€
  • stats.stales β€” see the stats attr stale-events πŸ‘€
  • rcu β€” the RCU head used for freeing the structure. The cleanup arc 🧹

πŸ¦‹ SEE ALSO πŸ¦‹

Go read these next, bestie β€” they're all in the kernel file ./include/net/psp/types.h:

  • struct psp_dev_config(9)
  • struct psp_assoc_dev(9)
  • struct psp_dev_caps(9)
  • struct psp_dev_ops(9)

And that's the whole page, mwah πŸ’‹ β€” brought to you by ./include/net/psp, dated October 2026, from the Kernel API Manual. Slay, go read your structs 🫢✨

πŸ“¦ where this page comes from