STRUCT PSP_DEV(9)
β¨ 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 ofpsp_assoc_deventries that are associated with this PSP device. It's giving friend group energy π―assoc_dev_cntβ how many entries are actually chillin' inassoc_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 attrkey-rotationsπstats.stalesβ see the stats attrstale-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
- 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