ENUM DEVLINK_TRAP_TYPE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay so listen up, because this one is from the Kernel API Manual and it's literally all about packet trap types β€” like what kind of trap are we even talking about?? Sit down, grab a πŸ“, and let's get into it.


✨ NAME ✨

enum devlink_trap_type β€” the packet trap type. That's it, that's the vibe. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

enum devlink_trap_type {
    DEVLINK_TRAP_TYPE_DROP ,
    DEVLINK_TRAP_TYPE_EXCEPTION ,
    DEVLINK_TRAP_TYPE_CONTROL

};

Three constants, zero drama, all iconic. πŸ‘‘


πŸŽ€ CONSTANTS πŸŽ€

  • DEVLINK_TRAP_TYPE_DROP β€” bestie the trap reason is a drop, full stop. The trapped packets get processed by devlink only and are not injected into the kernel's Rx path. They're not coming back, periodt. πŸ’€
  • DEVLINK_TRAP_TYPE_EXCEPTION β€” this one's an exception, like the packet did not get forwarded as intended because something went wrong (e.g., a missing neighbour entry β€” yeah, that kind of thing 😭), so it got trapped and sent to the control plane to get sorted out. Trapped packets here are processed by devlink and injected into the kernel's Rx path. She's going both places, main character energy. ✨
  • DEVLINK_TRAP_TYPE_CONTROL β€” packet got trapped because the control plane literally needs it to function correctly. Example? An ARP request packet, iykyk. Trapped packets are injected into the kernel's Rx path, but β€” and hear me out β€” they are not reported to drop monitor. πŸ™ˆ

🌈 SEE ALSO 🌈

  • Kernel file ./include/uapi/linux/devlink.h
  • enum devlink_trap_action(9)
  • enum devlink_port_fn_opstate(9)

Go read those too, they're literally so good. 🫢


And that's the page! ✨ She lives in ./include/uapi/linux, dated October 2026, and the whole thing is from the Kernel API Manual. Slay, go forth and trap your packets responsibly. πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from