libeth_xdp_xmit_do_bulk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… libeth_xdp_xmit_do_bulk β€” the Kernel API Manual era

okay bestie, so this one is a kernel function from the manual page named libeth_xdp_xmit_do_bulk (manual name libeth_xdp_xmit_do_bulk, section 9, the Kernel API Manual, iykyk) and honestly? it's giving "one function does the whole job". here's the deal: this bad boy is how you implement the entire .ndo_xdp_xmit() callback in your driver. yeah. the whole thing. no cap. πŸ‘‘


✨ SYNOPSIS ✨

libeth_xdp_xmit_do_bulk (dev , n , fr , f , xqs , nqs , fl , fin );

that's the signature, character for character, please don't @ me about the spacing, it's verbatim πŸ™ˆ


🌸 ARGUMENTS 🌸

  • dev β€” the target net_device. like, the actual network device you're sending stuff out of. the main character of the situation πŸŽ€
  • n β€” number of frames to send. yes bestie, an actual count, please get it right.
  • fr β€” the XDP frames to send. this is the goods. the payload squad. πŸ¦‹
  • f β€” flags passed by the stack. don't invent your own, they came from above.
  • xqs β€” an array of XDPSQ driver structs. plural. it's a whole array, not one.
  • nqs β€” number of active XDPSQs, which is also the length of that array up there. they match, always, periodt.
  • fl β€” driver callback to flush an XDP xmit bulk. that's your flush hook, your "okay go go go" button πŸ”₯
  • fin β€” driver callback to finalize the queue. (the page literally says "cabback" β€” yeah, it's a typo for callback, we love her anyway πŸ’€) this is the finalize hook.

πŸ’– DESCRIPTION πŸ’–

so the vibe is: if the driver has active XDPSQs, then this function performs the common checks and sends the frames. that's it. that's the whole description and honestly it ate.

also β€” and this is important β€” it finalizes the queue, if requested. so only if somebody asked for it. not out here finalizing queues unprompted, we're not that kind of girl πŸ™…β€β™€οΈ


πŸŽ€ RETURN πŸŽ€

number of frames sent, or -errno on error. so like, a happy little count on success, a sad little negative errno on failure. check it, always. 🌈


🫢 SEE ALSO 🫢

okay this list is long, grab a snack πŸ“ β€” and ngl it's basically the entire libeth extended universe. the kernel file lives at ./include/net/libeth/xdp.h, and here's every single thing it wants you to go look at:

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_tx_init_bulk(9), libeth_xdp_init_buff(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)

that's a lot of cross-references and yes, there are two enum (anonymous)(9) entries β€” that's not me being messy, that's literally what's on the page, icons only πŸ’…


πŸ’€ reminder bestie: this only does the send when the driver actually has active XDPSQs, and it only finalizes the queue if requested. don't forget to check the return value for the -errno case. mwah. 😘

and that's the whole page! source file path ./include/net/libeth, dated October 2026, and the version/source line signs off as libeth_xdp_xmit_do_bulk(9) β€” tysm for reading, go slay those frames βœ¨πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from