STRUCT DEVLINK_TRAP_GROUP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the Kernel API Manual, and today's main character is struct devlink_trap_group β€” aka the immutable packet trap group attributes, and yes that is literally its whole NAME section. immaculate. iconic. let's get into it πŸŽ€


✨ SYNOPSIS ✨

here's the whole vibe, copy-pasted exactly because we do not play with struct definitions:

struct devlink_trap_group {
    const char *name;
    u16 id;
    bool generic;
    u32 init_policer_id;
 };

look at her. four fields. no notes. 🫢


🌸 Members 🌸

okay let's meet the squad, member by member, and yes i'm keeping every single one:

  • name β€” the trap group name. that's her government name, the one on the birth certificate. πŸ’…
  • id β€” the trap group identifier. her little number, her student ID, her iykyk code. πŸ”’
  • generic β€” whether the trap group is generic or not. it's a bool, so it's giving yes-or-no, no in-between, no "it's complicated". πŸ€”
  • init_policer_id β€” the initial policer identifier. the starter ID. the before picture. ✨

πŸ¦‹ Description πŸ¦‹

so what does this struct actually do? it describes the immutable attributes of packet trap groups β€” the ones that drivers register with devlink. immutable, bestie! you can't just casually change them, that's not the vibe. drivers register them, and these attributes are locked in like a tweet from 2014. πŸ‘‘

no cap, that's the whole description, and i will not be adding lore that isn't there. 🧚


🌈 SEE ALSO 🌈

the whole extended universe, straight from the Kernel file ./include/net/devlink.h β€” every single cross-reference, zero skips, because we stan completeness:

  • 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_health_reporter_ops(9)
  • struct devlink_trap_metadata(9)
  • struct devlink_trap_policer(9)
  • struct devlink_trap(9)
  • struct devlink_port_ops(9)

like, that is a squad. read them all, bestie, they're all main characters in their own pages. πŸ”₯


lowkey reminder: everything above is the immutable attribute set, so don't go thinking you can just mutate these fields and slay. that's not the assignment. πŸ’€

and that's the page! πŸŽ€ this little love letter lives in ./include/net, dated October 2026, and signs off as struct devlink_trap_group(9) β€” periodt. go be obsessed with packet trap groups, you're literally so good at this. πŸ’–πŸŒΈπŸ¦‹πŸ‘‘β­πŸ’…

πŸ“¦ where this page comes from