ENUM LIBETH_SQE_TYPE(9)
β¨ 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β akmalloc-allocated buffer. so you unmap it andkfreeit π₯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β ansk_buff. unmap it, thennapi_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β anskb_shared_info. you dolibeth_xdp_return_buff_bulkand then stats πLIBETH_SQE_XDP_XMITβ anxdp_frame. unmap it,xdp_return_frame_bulk, and stats πLIBETH_SQE_XDP_XMIT_FRAGβ anxdp_framefrag. only unmap the DMA, nothing else π§LIBETH_SQE_XSK_TXβ alibeth_xdp_buffsitting on an XSk queue. youxsk_buff_freeit, plus stats πLIBETH_SQE_XSK_TX_FRAGβ alibeth_xdp_bufffrag on an XSk queue. justxsk_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:
- Kernel file
./include/net/libeth/tx.hstruct libeth_sqe(9) LIBETH_SQE_CHECK_PRIV(9)struct libeth_cq_pp(9)libeth_tx_complete(9)
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
- 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