xsk_buff_raw_get_ctx(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xsk_buff_raw_get_ctx(9) β€” like, the Kernel API Manual page, bestie

okay so real talk, this one lives in the Kernel API Manual section 9 (kernel developer vibes only, no cap), and it's literally called xsk_buff_raw_get_ctx. Say that five times fast. Or don't. I couldn't. 🫢


✨ NAME ✨

xsk_buff_raw_get_ctx β€” get a &xdp_desc context, periodt


🌸 SYNOPSIS 🌸

struct xdp_desc_ctx xsk_buff_raw_get_ctx (const struct xsk_buff_pool
*pool , u64 addr , u32 options );

yes bestie that's the whole signature, copy it exactly, don't @ me πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • pool β€” the XSk buff pool that the desc address belongs to 🏊 like, which pool this address is swimming in
  • addr β€” the desc address (and it comes from userspace, iykyk πŸ‘€)
  • options β€” the desc options (also straight from userspace, fr fr)

πŸ¦‹ DESCRIPTION πŸ¦‹

So this is a wrapper for xp_raw_get_ctx, and it's the one you use in drivers β€” yes, drivers specifically, main character energy only πŸš—βœ¨. For all the actual details, go read its kdoc, because that's where the lore lives. This page is giving "see the source for the plot" πŸ™ˆ


🌈 RETURN 🌈

It hands you back a new xdp_desc_ctx struct containing the desc's DMA address and the metadata pointer β€” but only if that metadata pointer is actually present, bestie. If it's not there, it's initialized to NULL instead. Slay. πŸ’€βœ¨


πŸ’– SEE ALSO πŸ’–


ok that's the whole page, go be iconic with your xdp descs πŸ§šβ€β™€οΈ

mwah πŸ’‹ this one's signed off from ./include/net and dated October 2026 β€” and it's xsk_buff_raw_get_ctx(9) all the way down, bestie πŸŽ€πŸ«Άβ­

πŸ“¦ where this page comes from