__xdp_buff_add_frag(9)
okay so youβre in the Kernel API Manual, bestie, and todayβs absolute main character is __xdp_buff_add_frag(9) π
β¨
πΈ NAME πΈ
__xdp_buff_add_frag β attach frag to &xdp_buff π
β¨ SYNOPSIS β¨
bool __xdp_buff_add_frag (struct xdp_buff *xdp , netmem_ref netmem , u32 offset , u32 size , u32 truesize , bool try_coalesce );
π ARGUMENTS π
xdpβ the XDP buffer to attach the frag to π«Άnetmemβ network memory containing the fragoffsetβ offset at which the frag startssizeβ size of the fragtruesizeβ total memory size occupied by the fragtry_coalesceβ whether to try coalescing the frags (not valid for XSk) π«
π DESCRIPTION π
okay so hereβs the tea: attach the frag to the XDP buffer. If it currently has no frags attached, initialize the related fields; otherwise check that the frag number didnβt reach the limit of MAX_SKB_FRAGS. If possible, try coalescing the frag with the previous one. π₯
The function doesnβt check/update the pfmemalloc bit. Please use the non-underscored wrapper in drivers. π
bestie, for real, please use the non-underscored wrapper in drivers π
π₯ RETURN π₯
true on success, false if thereβs no space for the frag in the shared info struct. periodt. π
π¦ SEE ALSO π¦
- Kernel file
./include/net/xdp.h XDP RX-queue information(9)xdp_buff_add_frag(9)xdp_rxq_info_attach_mem_model(9)xdp_rxq_info_detach_mem_model(9)
xoxo, your girl from ./include/net β October 2026 β signing off for __xdp_buff_add_frag(9) ππ
π¦ 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