STRUCT DEVLINK_LINECARD_OPS(9)
π struct devlink_linecard_ops(9) β the Kernel API Manual, bestie edition
okay so this is the page for struct devlink_linecard_ops(9) from the Kernel API Manual, and honestly? it's giving "small but mighty" β¨ it's literally the ops table for linecard operations, and we're gonna go through it together, no cap π«Ά
β¨ NAME β¨
struct devlink_linecard_ops β Linecard operations π
like, the whole vibe of this struct is "here's what a driver can do with a linecard slot", periodt.
πΈ SYNOPSIS πΈ
struct devlink_linecard_ops {
int (*provision)(struct devlink_linecard *linecard, void *priv,
const char *type, const void *type_priv,
struct netlink_ext_ack *extack);
int (*unprovision)(struct devlink_linecard *linecard, void *priv,
struct netlink_ext_ack *extack);
bool (*same_provision)(struct devlink_linecard *linecard, void *priv,
const char *type, const void *type_priv);
unsigned int (*types_count)(struct devlink_linecard *linecard, void *priv);
void (*types_get)(struct devlink_linecard *linecard, void *priv,
unsigned int index, const char **type,
const void **type_priv);
};
five function pointers, all iconic, all doing their little job π
π Members π
the callbacks, one by one π¦
provisionβ the callback that provisions the linecard slot with a certain type of linecard. and here's the important part, bestie: as a result of this operation, the driver is expected to eventually call one ofdevlink_linecard_provision_setordevlink_linecard_provision_failβ and "eventually" means it could even be after the function call returns π so don't go assuming it's done the second you return, iykyk.unprovisionβ the callback that unprovisions the linecard slot. same deal as above: as a result of this operation the driver is expected to eventually (again, could be after the function call returns) call eitherdevlink_linecard_provision_clearordevlink_linecard_provision_fail. it's giving "I'll text you later", and the text is one of those two functions πsame_provisionβ the callback that asks the driver whether the linecard is already provisioned in the same way the user is asking this linecard to be provisioned. like a vibe check on the current provisioning π₯types_countβ callback to get the number of supported types. simple, efficient, main character energy.types_getβ callback to get the next type in the list. it's a "gimme the next one" situation π
π SEE ALSO π
Kernel file ./include/net/devlink.h β plus a whole friend group of structs, all of them (9) pages, all of them part of the devlink cinematic universe π¬:
struct devlink_port_pci_pf_attrs(9)struct devlink_port_pci_vf_attrs(9)struct devlink_port_pci_sf_attrs(9)struct devlink_port_attrs(9)struct devlink_dpipe_field(9)struct devlink_dpipe_header(9)struct devlink_dpipe_match(9)struct devlink_dpipe_action(9)struct devlink_dpipe_value(9)struct devlink_dpipe_entry(9)struct devlink_dpipe_dump_ctx(9)struct devlink_dpipe_table(9)struct devlink_dpipe_table_ops(9)struct devlink_dpipe_headers(9)struct devlink_resource_size_params(9)struct devlink_flash_notify(9)struct devlink_param(9)struct devlink_flash_update_params(9)struct devlink_region_ops(9)struct devlink_port_region_ops(9)struct devlink_health_reporter_ops(9)struct devlink_trap_metadata(9)struct devlink_trap_policer(9)struct devlink_trap_group(9)struct devlink_trap(9)struct devlink_port_ops(9)
ngl, that's a lot of SEE ALSOs, but every single one of them is listed above, so we're not skipping a single one π«Ά read them all, bestie, they're family.
and that's the whole page!! mwah π
cute little sign-off before you close the tab: this gem lives in ./include/net, it's dated October 2026, and the page you just read is struct devlink_linecard_ops(9). slay, you're now officially informed ππ
π
π¦ 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