iptfs_pskb_add_frags(9)
π iptfs_pskb_add_frags β from the Kernel API Manual, bestie π
okay so this is iptfs_pskb_add_frags(9) and no cap, it's literally the glow-up arc for sk_buffs: it takes a template and a pile of fragments and builds you a brand new sk_buff. iconic behavior honestly β¨
πΈ NAME πΈ
iptfs_pskb_add_frags β create and add frags into a new sk_buff. that's it, that's the whole vibe π¦
β SYNOPSIS β
struct sk_buff * iptfs_pskb_add_frags (struct sk_buff *tpl , struct
iptfs_skb_frag_walk *walk , u32 off , u32 len , struct skb_seq_state *st
, u32 copy_len );
yes it's a long signature, don't panic, we're gonna walk through every single arg together π«Ά
π ARGUMENTS π
tplβ the template, aka the blueprint. the new skb gets created from this one. main character energy from the jump πwalkβ the source for the fragments you're adding. this is where the frags live, we're just borrowing them πoffβ the offset intowalkwhere you start pulling frags from. also gets used withstandcopy_len, so it's a busy girl. multi-tasking queen πlenβ the length of data to add, covering the frags fromwalkinto the skb. this must be<= skblenβ fr fr, don't test it π«£stβ the sequence state that gets copied into the new head skb πcopy_lenβ copycopy_lenbytes fromstat offsetoffinto the new skb's linear space. head space gets the love first π
β¨ DESCRIPTION β¨
so here's the whole storyline, bestie:
it creates a brand new sk_buff called skb using the template tpl π§
then it copies copy_len bytes from st into the new skb's linear space (the head, basically β the cozy part) π
and then for the remaining len of data β like, literally len - copy_len bytes β it adds shared fragments from the frag walk π₯
so it's giving: little bit of linear, whole lot of shared frags, one gorgeous new skb at the end. ate and left no crumbs π
π RETURN π
the newly allocated sk_buff skb β yay π
or NULL if an error occurs π (yes it can fail, and when it does, NULL is all you get, so check it, iykyk)
π¦ SEE ALSO π¦
all the siblings and cousins, alphabetically unbothered:
- Kernel file
./net/xfrm/xfrm_iptfs.c 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_skb_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)
ngl the frag walk stuff is a whole friend group β go readiptfs_skb_prepare_frag_walk(9)andiptfs_skb_can_add_frags(9)before you start adding frags, bestie, save yourself the pain π
and that's the page!! πΈ mwah π
this little masterpiece is filed under ./net/xfrm, dated October 2026, and it's page iptfs_pskb_add_frags(9) of the Kernel API Manual β go off, kernel docs, you absolute icons πβπ
π¦ 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