devlink_shd_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, straight from the Kernel API Manual: this one is about getting or creating a shared devlink instance. It's giving β€œyou already know them? then you already know them” energy. 🫢


✨ NAME ✨

devlink_shd_get β€” Get or create a shared devlink instance. lowkey iconic. πŸ’…

🌸 SYNOPSIS 🌸

       struct devlink * devlink_shd_get (const char *id , const struct
       devlink_ops *ops , size_t priv_size , const struct device_driver *driver
       );

No cap, that's the whole signature. ✨

πŸŽ€ ARGUMENTS πŸŽ€

  • id β€” Identifier string (e.g., serial number) for the shared instance. It's the group-chat name, basically.
  • ops β€” Devlink operations structure. The whole ops vibe.
  • priv_size β€” Size of private data structure.
  • driver β€” Driver associated with the shared devlink instance.

πŸ¦‹ DESCRIPTION πŸ¦‹

Get an existing shared devlink instance identified by id, or create a new one if it doesn't exist. Return the devlink instance with a reference held. The caller must call devlink_shd_put when done. 🫢

All callers sharing the same id must pass identical ops, priv_size and driver. A mismatch triggers a warning and returns NULL.

⚠️ bestie, do not play with this: a mismatch triggers a warning and returns NULL. periodt.

🌈 RETURN 🌈

Pointer to the shared devlink instance on success, NULL on failure. That's the whole vibe check. βœ…

πŸ‘‘ SEE ALSO πŸ‘‘


xoxo, this page's source is ./net/devlink, dated October 2026. slay and read the source. πŸ’œ

πŸ“¦ where this page comes from