iptfs_skb_add_frags(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ iptfs_skb_add_frags(9) ✨

okay so bestie, welcome to the iptfs_skb_add_frags page from the Kernel API Manual β€” this one's all about stuffing a whole range of fragment references into an skb, and honestly it's giving "small function, big responsibility" πŸ’…


🌸 NAME 🌸

iptfs_skb_add_frags β€” add a range of fragment references into an skb πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

int iptfs_skb_add_frags (struct sk_buff *skb , struct
iptfs_skb_frag_walk *walk , u32 offset , u32 len );

πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the skb you're adding references into, bestie. this is the destination ✨
  • walk β€” the walk you're pulling those referenced fragments from. it's the source of the vibes 🫢
  • offset β€” how far from the beginning of the original skb you start. like, where the story begins 🌈
  • len β€” how much data you want frag references added for in skb. the amount, the quantity, the whole point πŸ’…

πŸ‘‘ DESCRIPTION πŸ‘‘

ngl, there's one thing you must know before you call this: you gotta call iptfs_skb_can_add_frags first. fr fr. that's the vibe check β€” it verifies that the destination skb is compatible with the walk, and that there's actual space in the array for the frag references that are about to be added. skip that step and you're just out here raw-dogging your memory, which is not the main character energy we want 😭

so: check first, add second. periodt ✨


πŸ”₯ RETURN πŸ”₯

this one returns the number of bytes that did not get added to skb β€” and the reason is kinda sad honestly: the walk hit its end before all of len could be added 😭 so a return value here is basically the leftovers, the bytes that didn't make it to the party πŸ’€


🧚 SEE ALSO 🧚

the kernel file ./net/xfrm/xfrm_iptfs.c, plus the whole friend group:

IPTFS_DEFAULT_DROP_TIME_USECS(9), IPTFS_DEFAULT_REORDER_WINDOW(9), IPTFS_DEFAULT_INIT_DELAY_USECS(9), IPTFS_DEFAULT_MAX_QUEUE_SIZE(9), struct xfrm_iptfs_config(9), struct xfrm_iptfs_data(9), iptfs_alloc_skb(9), iptfs_skb_head_to_frag(9), struct iptfs_skb_frag_walk(9), iptfs_skb_prepare_frag_walk(9), iptfs_skb_can_add_frags(9), iptfs_pskb_add_frags(9), iptfs_pskb_extract_seq(9), iptfs_input_save_runt(9), __iptfs_iphlen(9), __iptfs_iplen(9), iptfs_complete_inner_skb(9), iptfs_reassem_abort(9), iptfs_reassem_done(9), iptfs_reassem_cont(9), iptfs_input_ordered(9), iptfs_drop_timer(9), iptfs_input(9), iptfs_enqueue(9), iptfs_copy_create_frag(9), iptfs_copy_create_frags(9), iptfs_first_skb(9), iptfs_encap_add_ipv4(9), iptfs_encap_add_ipv6(9), iptfs_prepare_output(9), __iptfs_get_inner_mtu(9), iptfs_get_inner_mtu(9), iptfs_user_init(9)


and that's the whole page, bestie!! 🫢 this lil gem lives in ./net/xfrm and it's stamped October 2026 β€” go forth and add those frag references responsibly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from