__pskb_copy_fclone(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

welcome to the __pskb_copy_fclone(9) page from the Kernel API Manual, bestie β€” and yes, this function's whole job is literally __pskb_copy_fclone β€” create copy of an sk_buff with private head. periodt πŸ’…βœ¨

✨ SYNOPSIS ✨

okay so the signature is giving:

struct sk_buff * __pskb_copy_fclone (struct sk_buff *skb , int headroom
, gfp_t gfp_mask , bool fclone );

πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” buffer to copy. the main character we're duplicating πŸ’–
  • headroom β€” headroom of new skb. yes, that's the actual parameter name, no cap.
  • gfp_mask β€” allocation priority. the vibe check for memory allocation ✨
  • fclone β€” if true, allocate the copy of the skb from the fclone cache instead of the head cache; it is recommended to set this to true for the cases where the copy will likely be cloned. iykyk 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen: this one makes a copy of both an sk_buff and part of its data, located in header. Fragmented data remain shared. it's the move for when the caller wishes to modify only header of sk_buff and needs private copy of the header to alter. no big dramatic full copy energy β€” just the header getting its own little private space πŸ’…

Returns NULL on failure or the pointer to the buffer on success. and the returned buffer has a reference count of 1. iconic, honestly πŸ‘‘

🌈 SEE ALSO 🌈

Kernel file: ./net/core/skbuff.c

the whole skb-adjacent crew is linked below β€” every single one, no skipping, fr fr:


mwah πŸ’‹ that's the whole page, bestie β€” source path ./net/core, version/date October 2026, and page __pskb_copy_fclone(9). bye 🫢✨

πŸ“¦ where this page comes from