libeth_xdp_return_buff(9)
π libeth_xdp_return_buff(9) π
ok so this is a page from the Kernel API Manual (yes, the Kernel API Manual, we're fancy now β¨) and it's all about one tiny little function that does one tiny little job, and honestly? it ate. let's get into it bestie π«Ά
πΈ NAME πΈ
libeth_xdp_return_buff β free/recycle &libeth_xdp_buff
like. that's it. that's the whole gig. it gives your buffer back. iconic behavior π
β¨ SYNOPSIS β¨
libeth_xdp_return_buff (xdp );
that's the whole call, no cap. one argument, in, out, done π
π¦ ARGUMENTS π¦
xdpβ buffer to free. that's the one. hand it over and it gets handled π
π₯ DESCRIPTION π₯
okay so this is a hotpath helper to free libeth_xdp_buff. hotpath, meaning it lives on the fast lane, the main character energy lane, the lane where every nanosecond is a vibe check π
comparing to xdp_return_buff, it's faster β and here's the why, bestie:
- it gets inlined (no function-call overhead, we love a no-overhead queen)
- it always assumes order-0 pages
- it always assumes safe direct recycling
so it's basically the speedrun version of the return. no branches, no questions, just vibes and recycling β»οΈβ¨
and lowkey the most important part: zeroes xdp->data to avoid UAFs. that's use-after-free, and we do not do those here. zeroing the pointer is the "delete your ex's number" of kernel programming β you keep yourself safe from future mistakes ππ
ngl this one is built on assumptions β order-0 pages and safe direct recycling are taken as read. it's fast because it doesn't double-check. iykyk π«Ά
π SEE ALSO π
okay this list is long long, so buckle up bestie, we're naming every single one because nobody gets left out π
- Kernel file
./include/net/libeth/xdp.h struct libeth_xdp_buff(9)__LIBETH_XDP_ONSTACK_BUFF(9)LIBETH_XDP_ONSTACK_BUFF(9)libeth_xdpsq_num(9)libeth_xdpsq_shared(9)libeth_xdpsq_id(9)libeth_xdpsq_get(9)libeth_xdpsq_put(9)libeth_xdpsq_lock(9)libeth_xdpsq_unlock(9)libeth_xdpsq_deinit_timer(9)libeth_xdpsq_queue_timer(9)libeth_xdpsq_run_timer(9)enum (anonymous)(9)π (yes there are two of these and no, i can't explain it, that's just how it is)enum (anonymous)(9)struct libeth_xdp_tx_frame(9)struct libeth_xdp_tx_bulk(9)LIBETH_XDP_ONSTACK_BULK(9)struct libeth_xdpsq(9)struct libeth_xdp_tx_desc(9)libeth_xdp_ptr_to_priv(9)libeth_xdp_priv_to_ptr(9)libeth_xdp_tx_xmit_bulk(9)libeth_xdp_tx_queue_head(9)libeth_xdp_tx_queue_frag(9)libeth_xdp_tx_queue_bulk(9)libeth_xdp_tx_fill_stats(9)libeth_xdp_tx_fill_buf(9)__libeth_xdp_tx_flush_bulk(9)libeth_xdp_tx_flush_bulk(9)libeth_xdp_xmit_init_bulk(9)libeth_xdp_xmit_frame_dma(9)libeth_xdp_xmit_queue_head(9)libeth_xdp_xmit_queue_frag(9)libeth_xdp_xmit_queue_bulk(9)libeth_xdp_xmit_fill_buf(9)libeth_xdp_xmit_flush_bulk(9)__libeth_xdp_xmit_do_bulk(9)libeth_xdp_xmit_do_bulk(9)libeth_xdp_tx_init_bulk(9)libeth_xdp_init_buff(9)libeth_xdp_save_buff(9)libeth_xdp_return_stash(9)libeth_xdp_prepare_buff(9)libeth_xdp_process_buff(9)libeth_xdp_buff_stats_frags(9)__libeth_xdp_run_prog(9)__libeth_xdp_run_flush(9)libeth_xdp_run_prog(9)__libeth_xdp_run_pass(9)libeth_xdp_run_pass(9)libeth_xdp_finalize_rx(9)LIBETH_XDP_DEFINE_TIMER(9)LIBETH_XDP_DEFINE_FLUSH_TX(9)LIBETH_XDP_DEFINE_FLUSH_XMIT(9)LIBETH_XDP_DEFINE_RUN_PROG(9)LIBETH_XDP_DEFINE_RUN_PASS(9)LIBETH_XDP_DEFINE_RUN(9)LIBETH_XDP_DEFINE_FINALIZE(9)libeth_xdp_buff_to_rq(9)libeth_xdpmo_rx_hash(9)__libeth_xdp_complete_tx(9)libeth_xdp_set_features(9)libeth_xdp_set_features_noredir(9)
that's the whole squad, every single one accounted for, nobody's getting left on read π
βΏ and that's the page! βΏ it lives in ./include/net/libeth, dated October 2026, and it goes by libeth_xdp_return_buff(9) β mwah, slay, go free some buffers bestie π
ππ
π¦ 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