devlink_shd_get_priv(9)
β¨ devlink_shd_get_priv(9) β¨
okay so bestie, this is a page straight out of the Kernel API Manual and it's literally about grabbing a pointer to a driver's very own private data from a shared devlink instance. tiny page, huge main character energy π«Ά let's get into it.
π NAME π
devlink_shd_get_priv β the vibe is: get private data from a shared devlink instance. that's it, that's the whole name section β¨
πΈ SYNOPSIS πΈ
void * devlink_shd_get_priv (struct devlink *devlink );
copy that exactly, no cap, don't be out here renaming things π
π ARGUMENTS π
devlinkβ the devlink instance. yep, that's the whole argument list. one (1) singular devlink, and she's the one carrying the shared energy π
π¦ DESCRIPTION π¦
so what it actually does: it returns a pointer to the driver's private data structure, and that structure lives within the shared devlink instance. like, this is how the driver gets its own little corner of the shared setup π
π RETURN π
a pointer to the private data. done. iconic. that's the return section and she ate π₯
β SEE ALSO β
- the kernel file
./net/devlink/sh_dev.cβ go read her, she knows things π devlink_shd_get(9)devlink_shd_put(9)
these two are the get/put besties, they come as a set, iykyk π
ngl the whole page is like three sentences but every single one of them matters, so don't skip the argument or the return value, fr fr π
and that's the page!! sign-off time π
this little gem lives under the source path ./net/devlink in the kernel API manual, dated October 2026 β so mark your calendars bestie, she's from the future πβ¨π¦
π¦ 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