STRUCT PSP_DEV_OPS(9)
π struct psp_dev_ops(9) β like, the netdev driver's PSP callback era π
okay bestie, gather round, because this is a page out of the Kernel API Manual and it's genuinely iconic. it's all about struct psp_dev_ops β which is, no cap, the netdev driver facing PSP callbacks. that's the whole vibe. it's the little bundle of function pointers a netdev driver hands over so the PSP core can call back into it. iykyk π«Ά
β¨ NAME β¨
struct psp_dev_ops β netdev driver facing PSP callbacks. yes, that's it, that's the assignment. π
πΈ SYNOPSIS πΈ
ok so here's the shape of it, verbatim, do not touch, she's perfect:
struct psp_dev_ops {
int (*set_config)(struct psp_dev *psd, struct psp_dev_config *conf,
struct netlink_ext_ack *extack);
int (*key_rotate)(struct psp_dev *psd, struct netlink_ext_ack
*extack);
int (*rx_spi_alloc)(struct psp_dev *psd, u32 version, struct
psp_key_parsed *assoc, struct netlink_ext_ack *extack);
int (*tx_key_add)(struct psp_dev *psd, struct psp_assoc *pas, struct
netlink_ext_ack *extack);
void (*tx_key_del)(struct psp_dev *psd, struct psp_assoc *pas);
void (*get_stats)(struct psp_dev *psd, struct psp_dev_stats *stats);
};
π Members π
bestie these are the six whole members and every single one is doing main character energy. let's go:
set_configβ set configuration of a PSP device. the driver is allowed to peek atpsd->configto see the previous configuration (like, a little looky-loo at the old fit before the new one π). and then the Core will updatepsd->configwithconfigon success. slay.key_rotateβ rotate the device key. short, sweet, iconic. that's the whole thing. πrx_spi_allocβ allocate an Rx SPI+key pair. it allocates an Rx SPI and the resulting derived key. and ngl, this key should remain valid until key rotation. periodt.tx_key_addβ add a Tx key to the device. it installs an association in the device, and the Core will allocate space for the driver to use atdrv_data. cute little reserved seat, we love that for you πͺtx_key_delβ remove a Tx key from the device. it removes an association from the device. bye bestie πget_statsβ get statistics from the device. the Stats required by the spec must be maintained and filled in. and here's the β¨actually importantβ¨ one:
β οΈ Stats must be filled in member-by-member, nevermemsetthe struct. like, do NOT do the lazymemsetthing. i am begging. it's giving undefined chaos and we simply do not stan. π
π¦ SEE ALSO π¦
go touch grass in the Kernel file ./include/net/psp/types.h β and while you're there, say hi to her friends:
struct psp_dev_config(9)struct psp_assoc_dev(9)struct psp_dev(9)struct psp_dev_caps(9)
okay that's the whole page!! you ate that, honestly. this one lives in ./include/net/psp and it's tagged October 2026 β so go forth, fill your stats member-by-member, and remember: never memset. 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