libeth_xdp_init_buff(9)
π libeth_xdp_init_buff(9) β the Kernel API Manual said "let's get this buffer ready" β¨
okay bestie, so this is a page straight out of the Kernel API Manual, and the star of the show is libeth_xdp_init_buff. Yes, that's a whole mouthful, but it's literally just a "prepare the buffer before the party starts" function. Let's go π
πΈ NAME
libeth_xdp_init_buff β initialize a &libeth_xdp_buff for Rx NAPI poll (yep, that's the whole gig π)
β¨ SYNOPSIS
void libeth_xdp_init_buff (struct libeth_xdp_buff *dst , const struct
libeth_xdp_buff_stash *src , struct xdp_rxq_info *rxq );
no return value, it's a void girlie β she does the work and she does NOT report back π«Ά
π ARGUMENTS
dstβ the on-stack buffer you're initializing. She's right there, on the stack. Iconic.srcβ the XDP buffer stash that got parked on the queue. Like a little pre-saved snack for later πrxqβ the registeredxdp_rxq_infothat corresponds to this queue. Every queue has one, no exceptions, periodt.
π₯ DESCRIPTION
Call this before the main NAPI polling loop, bestie. Not during. Not after. Before π
What it does: it loads up the content from the stash you saved earlier β OR it initializes the buffer from scratch if there's nothing saved. Either way, when this returns, your buffer is ready to go out into the world.
β οΈ Do not use for XSk. Like, at all. That's a hard no, no cap. Do not pass XSk through this. π«
π¦ SEE ALSO
Honestly? The friend group is huge. Here's literally everyone:
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)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_save_buff(9)libeth_xdp_return_stash(9)libeth_xdp_return_buff(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)
...and also go peek at the kernel file ./include/net/libeth/xdp.h if you want the source tea β iykyk
and that's the whole page, babe π«
this fab little writeup lives at ./include/net/libeth, dated October 2026, and it's literally titled libeth_xdp_init_buff(9) β catch you in the next man page, mwah ππ
π¦ 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