STRUCT DEVLINK_REGION_OPS(9)
okay bestie, welcome to struct devlink_region_ops(9) from the Kernel API Manual β itβs giving region operations, and weβre gonna read it like a group chat. π«Άβ¨
πΈ NAME πΈ
struct devlink_region_ops β Region operations. Thatβs the name, thatβs the assignment, periodt. π
β¨ SYNOPSIS β¨
struct devlink_region_ops {
const char *name;
void (*destructor)(const void *data);
int (*snapshot)(struct devlink *devlink, const struct
devlink_region_ops *ops, struct netlink_ext_ack *extack, u8 **data);
int (*read)(struct devlink *devlink, const struct devlink_region_ops
*ops, struct netlink_ext_ack *extack, u64 offset, u32 size, u8 *data);
void *priv;
};
π Members π
okay so hereβs the member-by-member tea, no cap: π
nameβ region name. iconic little label moment. π·οΈdestructorβ callback used to free snapshot memory when deleting. yes bestie, cleanup duty. π§Ήsnapshotβ callback to request an immediate snapshot. On success, thedatavariable must be updated to point to the snapshot data. The function will be called while the devlink instance lock is held. ππΈreadβ callback to directly read a portion of the region. On success, thedatapointer will be updated with the contents of the requested portion of the region. The function will be called while the devlink instance lock is held. ππprivβ pointer to driver private data for the region operation. the VIP private stash. π
π¦ SEE ALSO π¦
Kernel file ./include/net/devlink.h β yes, thatβs the source file, bestie. Go look at the real thing when you need it. π
the page also points you at these:
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_linecard_ops(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_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)
byeee π«Ά this page is from the ./include/net corner of the source tree, dated October 2026 β struct devlink_region_ops(9) out. πβ¨
π¦ 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