skb_pp_cow_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… skb_pp_cow_data(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so real quick β€” this is a page from the Kernel API Manual, and it's about one tiny little function that's lowkey doing iconic work under the hood. let's get into it ✨


🌸 NAME 🌸

skb_pp_cow_data β€” copy skb data into page-pool backed storage

like, it takes your skb's data and copies it into storage that lives in a page pool. copy-on-write energy, but make it pool. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

int skb_pp_cow_data (struct page_pool *pool , struct sk_buff **pskb ,
unsigned int headroom );

that's the whole signature, no cap. three args, returns an int. slay. πŸ’…


⭐ ARGUMENTS ⭐

  • pool β€” the page pool you're allocating from, bestie. that's where the new storage comes from 🫢
  • pskb β€” a pointer to the skb pointer. on success, it gets replaced with the copied skb. so yeah, it's pointer-to-a-pointer, it's giving inception but it works 😭
  • headroom β€” how much headroom to reserve in the copied skb. that's it, that's the vibe ✨

🧚 DESCRIPTION 🧚

so here's the tea: skb_copy_bits handles both frags[] and frag_list input. the way that it just Does Both? obsessed.

and if the copied skb stays non-linear (iykyk), it uses frags[] β€” which is literally the representation used by XDP multi-buffer. so if you're in XDP multi-buffer land, you already know. πŸ‘‘


πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • a negative errno on failure πŸ’€

that's it. zero or sad. no in between.


πŸ’œ SEE ALSO πŸ’œ

okay this list is LONG, so buckle up. it's the kernel file ./net/core/skbuff.c, and then every one of these bad boys β€” all (9), all iconic:

fr fr that's all of them, every single one, don't come for me πŸ’€πŸ«Ά


ngl this page is short but the SEE ALSO section is carrying the entire group chat. read them, bestie. they're all in ./net/core/skbuff.c and they're all doing main character work. πŸ“šβœ¨

and that's the whole page!! πŸŽ€ written from ./net/core, dated October 2026, in the Kernel API Manual β€” catch you on the next one, bestie πŸ’–πŸŒˆβ­

πŸ“¦ where this page comes from