STRUCT DEVLINK_HEALTH_REPORTER_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so quick vibe check: this page is from the Kernel API Manual, and it's literally all about struct devlink_health_reporter_ops β€” the reporter operations struct. think of it as the little instruction card your devlink health reporter fills out so the kernel knows how to poll it, dump it, diagnose it, and recover it. iconic behavior honestly πŸ’…


✨ NAME ✨

struct devlink_health_reporter_ops β€” Reporter operations. that's it, that's the whole name section, she's short and sweet πŸŽ€


🌸 SYNOPSIS 🌸

here's the struct in all her glory, copy-pasted exactly because we do NOT mess with code:

struct devlink_health_reporter_ops {
    char *name;
    int (*recover)(struct devlink_health_reporter *reporter, void
*priv_ctx, struct netlink_ext_ack *extack);
    int (*dump)(struct devlink_health_reporter *reporter, struct
devlink_fmsg *fmsg, void *priv_ctx, struct netlink_ext_ack *extack);
    int (*diagnose)(struct devlink_health_reporter *reporter, struct
devlink_fmsg *fmsg, struct netlink_ext_ack *extack);
    int (*test)(struct devlink_health_reporter *reporter, struct
netlink_ext_ack *extack);
    u64 default_graceful_period;
    u64 default_burst_period;
 };

look at her. five callbacks and two u64 defaults. main character energy fr fr πŸ‘‘


πŸ¦‹ Members πŸ¦‹

let's go member by member, no skips, no skimming:

  • name β€” the reporter name. literally just her name tag 🏷️
  • recover β€” callback to recover from a reported error, and if priv_ctx is NULL it runs a full recover. so like, priv_ctx set means a partial situation, NULL means go all in πŸ’ͺ
  • dump β€” callback to dump an object, and if priv_ctx is NULL it runs a full dump. same energy as recover, different output 😌
  • diagnose β€” callback to diagnose the current status. basically a health check-up 🩺
  • test β€” callback to trigger a test event. yes bestie, we're poking it on purpose πŸ§ͺ
  • default_graceful_period β€” default min time (in msec) between recovery attempts. she's the cooldown timer ⏳
  • default_burst_period β€” default time (in msec) for error recoveries before starting the grace period. so: burst first, then grace. periodt 🌈
ngl the msec thing matters β€” both of those defaults are in milliseconds, so don't go typing seconds in there πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/net/devlink.h, plus a whole friend group of structs β€” all of these, in order, no cap:

  • 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_region_ops(9)
  • struct devlink_port_region_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)

that's the whole page bestie, you ate that πŸ’– this one lives in ./include/net and the page is dated October 2026 β€” so like, from the future?? anyway, go read devlink.h and slay ✨🫢

πŸ“¦ where this page comes from