ENUM DEVLINK_TRAP_TYPE(9)
π enum devlink_trap_type(9) β Kernel API Manual, bestie edition β¨
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 bydevlinkonly 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 bydevlinkand 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
- 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