STRUCT LIBETH_XDP_BUFF_STASH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct libeth_xdp_buff_stash(9) πŸ’…

okay so bestie, you're reading the Kernel API Manual rn β€” welcome, this is the libeth corner of the kernel and we're about to make it make sense 🫢


✨ NAME ✨

struct libeth_xdp_buff_stash β€” literally the struct you use for stashing an &xdp_buff onto a queue πŸŽ€ no cap, that's the whole job.


🌸 SYNOPSIS 🌸

struct libeth_xdp_buff_stash {
    void *data;
    u16 headroom;
    u16 len;
    u32 frame_sz:24;
    u32 flags:8;
 };

bestie look at that bitfield β€” frame_sz gets 24 bits and flags gets 8 bits, and they're roommates in the same u32. slay. πŸ’…


πŸ¦‹ Members πŸ¦‹

  • data β€” pointer to the start of the frame, i.e. xdp_buff.data. this is where the frame begins, main character energy ✨
  • headroom β€” the frame headroom, computed as xdp_buff.data - xdp_buff.data_hard_start. it's the spare space before your data, lowkey important 🌸
  • len β€” the frame's linear space length, i.e. xdp_buff.data_end - xdp_buff.data. the actual amount of linear frame you've got πŸŽ€
  • frame_sz β€” the truesize occupied by the frame, xdp_buff.frame_sz. yes it's the whole footprint, not just the payload πŸ’–
  • flags β€” xdp_buff.flags. the vibes check bits, faithfully carried over πŸ”₯

πŸ’œ Description πŸ’œ

so here's the tea β˜•: xdp_buff is 56 bytes long on x64, and libeth_xdp_buff is 64 bytes. that's the size gap we're working with, bestie.

this structure carries only the necessary fields to save/restore a partially built frame on the queue structure 🫢 so you can finish building it during the next NAPI poll. that's it. that's the whole vibe. no extra luggage, just the essentials β€” it's giving minimalist icon πŸ‘‘


🌈 SEE ALSO 🌈

  • Kernel file ./include/net/libeth/types.h
  • struct libeth_rq_napi_stats(9)
  • struct libeth_sq_napi_stats(9)
  • struct libeth_xdpsq_napi_stats(9)
  • struct libeth_xdpsq_lock(9)
  • struct libeth_xdpsq_timer(9)

go read those next, they're all in the same friend group fr fr πŸ¦‹


and that's the page!! brought to you by ./include/net/libeth, dated October 2026 β€” mwah, go forth and stash responsibly πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from