ENUM LIBETH_SQE_TYPE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ enum libeth_sqe_type(9) ✨

okay so bestie, we're in the Kernel API Manual today and this one is genuinely so fun β€” it's literally the enum that tells you what kind of thing a &libeth_sqe is so the Tx completion path knows what to do with it. no cap, it's the vibe check for your completion queue πŸ’…


🌸 NAME 🌸

enum libeth_sqe_type β€” the type of &libeth_sqe you're acting on when you do Tx completion. like, "who dis" but for a tx descriptor πŸŽ€


✨ SYNOPSIS ✨

enum libeth_sqe_type {
    LIBETH_SQE_EMPTY ,
    LIBETH_SQE_CTX ,
    LIBETH_SQE_SLAB ,
    LIBETH_SQE_FRAG ,
    LIBETH_SQE_SKB ,
    __LIBETH_SQE_XDP_START ,
    LIBETH_SQE_XDP_TX ,
    LIBETH_SQE_XDP_XMIT ,
    LIBETH_SQE_XDP_XMIT_FRAG ,
    LIBETH_SQE_XSK_TX ,
    LIBETH_SQE_XSK_TX_FRAG

};

(yeah the weird comma spacing is in the original, that's just how it is, we don't fix it, we respect it 🫢)


πŸ¦‹ Constants πŸ¦‹

so each of these is a lil label telling completion what to do. some of them are like "bestie there's literally nothing to do" and some are like "unmap AND free AND update stats, main character energy". every single one, in order, no skipping πŸ’–

  • LIBETH_SQE_EMPTY β€” unused/empty, OR an XDP_TX/XSk frame. basically no action required, it's giving "nothing to see here" ⭐
  • LIBETH_SQE_CTX β€” a context descriptor with an empty SQE. again, no action required πŸŽ€
  • LIBETH_SQE_SLAB β€” a kmalloc-allocated buffer. so you unmap it and kfree it πŸ”₯
  • LIBETH_SQE_FRAG β€” a mapped skb frag. only thing to do is unmap the DMA, that's it, that's the whole job 🌸
  • LIBETH_SQE_SKB β€” an sk_buff. unmap it, then napi_consume_skb, then update stats. three-step slay πŸ’…
  • __LIBETH_SQE_XDP_START β€” not a real type bestie, it's the separator between the skb types and the XDP types. literally just a fence 🌈
  • LIBETH_SQE_XDP_TX β€” an skb_shared_info. you do libeth_xdp_return_buff_bulk and then stats πŸ‘‘
  • LIBETH_SQE_XDP_XMIT β€” an xdp_frame. unmap it, xdp_return_frame_bulk, and stats πŸ’œ
  • LIBETH_SQE_XDP_XMIT_FRAG β€” an xdp_frame frag. only unmap the DMA, nothing else 🧚
  • LIBETH_SQE_XSK_TX β€” a libeth_xdp_buff sitting on an XSk queue. you xsk_buff_free it, plus stats πŸ“
  • LIBETH_SQE_XSK_TX_FRAG β€” a libeth_xdp_buff frag on an XSk queue. just xsk_buff_free, that's it πŸ¦‹
ngl, the pattern here is iconic: the *_FRAG ones are always "only unmap DMA" girls, they do one thing and they do it well 😭

πŸ”₯ SEE ALSO πŸ”₯

go read these next, iykyk:


okay that's the whole page bestie, go forth and complete your Tx 🫢 from ./include/net/libeth, October 2026 β€” mwah, periodt πŸ’–βœ¨

πŸ“¦ where this page comes from