devl_linecard_create(9)
π devl_linecard_create(9)
okay so bestie, welcome to the Kernel API Manual β this one's called devl_linecard_create, and yes it's a (9) page which means it's a kernel function, not a command you type into your shell. iykyk π
It lives in ./net/devlink. slay.
β¨ NAME β¨
devl_linecard_create β create a devlink linecard. that's it, that's the whole vibe. literally just making a linecard. π
πΈ SYNOPSIS πΈ
struct devlink_linecard * devl_linecard_create (struct devlink *devlink
, unsigned int linecard_index , const struct devlink_linecard_ops *ops ,
void *priv );
bestie look at her. four arguments, one return value, zero chill. β¨
π¦ ARGUMENTS π¦
devlinkβ the devlink. yeah. that's the whole description. it's a devlink. π«Άlinecard_indexβ the driver-specific numerical identifier of the linecard. key word here is driver-specific, so it's literally whatever numbering your driver feels like, no cap.opsβ the linecard's ops. the operations. the moves. πprivβ user priv pointer. it's yours, do what you want with it. π
π DESCRIPTION π
okay so here's the tea: this creates a devlink linecard instance with the linecard index you provided. and the caller β that's you, bestie β can use any indexing you want. literally any. even a hw-related one. it's giving "you do you". π₯
β RETURN β
you get back either the line card structure (slay π) or an ERR_PTR encoded error code (not slay π). check it before you deref it, please, i'm begging.
π SEE ALSO π
okay so the kernel file it lives in is ./net/devlink/linecard.c, and here's the whole friend group β go say hi π:
devl_linecard_destroy(9)devlink_linecard_provision_set(9)devlink_linecard_provision_clear(9)devlink_linecard_provision_fail(9)devlink_linecard_activate(9)devlink_linecard_deactivate(9)devlink_linecard_nested_dl_set(9)
and that's the page, bestie π§ this one came out of ./net/devlink and it's dated October 2026 β yes, the future. we stay ahead. πβ¨
π¦ 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