xdp_buff_add_frag(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

xdp_buff_add_frag β€” the one that attaches a frag to &xdp_buff, bestie πŸŽ€


✨ SYNOPSIS ✨

okay so picture this in the Kernel API Manual, section 9, and it looks exactly like this:

bool xdp_buff_add_frag (struct xdp_buff *xdp , netmem_ref netmem , u32
       offset , u32 size , u32 truesize );

🌸 ARGUMENTS 🌸

  • xdp β€” the XDP buffer you're attaching the frag to 🫢
  • netmem β€” the network memory that's holding the frag
  • offset β€” the offset where the frag starts
  • size β€” how big the frag is
  • truesize β€” the total memory size the frag occupies

πŸ¦‹ DESCRIPTION πŸ¦‹

So this is the version of __xdp_buff_add_frag that takes care of the pfmemalloc bit for you πŸ’« like, same energy, it just handles that bit so you don't have to. Obsessed, honestly.


πŸ”₯ RETURN πŸ”₯

  • true β€” success, we ate πŸ’…
  • false β€” there's no space for the frag in the shared info struct 😭

🌈 SEE ALSO 🌈


and that's the whole page, bestie 🫢 mwah πŸ’‹ β€” it calls ./include/net home, it's dated October 2026, and if you ever lose it in the group chat it's filed under xdp_buff_add_frag(9). periodt ✨

πŸ“¦ where this page comes from