ENUM NETDEV_XDP_ACT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ enum netdev_xdp_act(9) ✨

okay bestie, so this is a page from the Kernel API Manual β€” we're talking about enum netdev_xdp_act, which is literally the enum that tells you which XDP features a netdev supports πŸ’… it's giving "feature flag checklist for your network driver" and honestly it's iconic.


🌸 SYNOPSIS 🌸

enum netdev_xdp_act {
    NETDEV_XDP_ACT_BASIC ,
    NETDEV_XDP_ACT_REDIRECT ,
    NETDEV_XDP_ACT_NDO_XMIT ,
    NETDEV_XDP_ACT_XSK_ZEROCOPY ,
    NETDEV_XDP_ACT_HW_OFFLOAD ,
    NETDEV_XDP_ACT_RX_SG ,
    NETDEV_XDP_ACT_NDO_XMIT_SG

};

no cap, that's the whole roster πŸ‘‘


πŸŽ€ Constants πŸŽ€

  • NETDEV_XDP_ACT_BASIC β€” the starter pack πŸ’– these are the XDP features that literally every driver supports: XDP_ABORTED, XDP_DROP, XDP_PASS, XDP_TX. if your driver can't do these… bestie, what is it even doing.
  • NETDEV_XDP_ACT_REDIRECT β€” this one means the netdev supports XDP_REDIRECT πŸ¦‹ (yeah, the packet packet goes elsewhere now).
  • NETDEV_XDP_ACT_NDO_XMIT β€” tells you whether the netdev implements the ndo_xdp_xmit callback πŸ”₯ so like, does it actually have the transmit hook or not.
  • NETDEV_XDP_ACT_XSK_ZEROCOPY β€” the flex one ✨ this says the netdev supports AF_XDP in zero copy mode. zero copies, zero problems, we love to see it.
  • NETDEV_XDP_ACT_HW_OFFLOAD β€” informs you if the netdev supports XDP hw offloading πŸ‘‘ hardware doing the work so the CPU doesn't have to? main character energy fr.
  • NETDEV_XDP_ACT_RX_SG β€” tells you if the netdev implements non-linear XDP buffer support in the driver napi callback 🌈 (scatter-gather at receive time, iykyk).
  • NETDEV_XDP_ACT_NDO_XMIT_SG β€” and this one's the sibling of the last: informs you if the netdev implements non-linear XDP buffer support in the ndo_xdp_xmit callback πŸ’œ transmit side this time.

🫢 SEE ALSO 🫢

  • Kernel file ./tools/include/uapi/linux/netdev.h enum
  • netdev_xdp_rx_metadata(9)
  • enum netdev_xsk_flags(9)

lowkey reminder bestie: this page lives under ./tools/include/uapi/linux and the manual is dated October 2026 β€” so if you're citing it in a group chat, that's the receipt πŸ’…

k byeee, go read the kernel headers, they're literally obsessed with you πŸ§šπŸ’–

πŸ“¦ where this page comes from