iptfs_pskb_add_frags(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 into walk where you start pulling frags from. also gets used with st and copy_len, so it's a busy girl. multi-tasking queen πŸ’…
  • len β€” the length of data to add, covering the frags from walk into 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 β€” copy copy_len bytes from st at offset off into 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:


ngl the frag walk stuff is a whole friend group β€” go read iptfs_skb_prepare_frag_walk(9) and iptfs_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