lkml.org 
[lkml]   [2021]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH NET 1/7] skbuff: introduce pskb_realloc_headroom()
On Mon, 12 Jul 2021 16:26:44 +0300 Vasily Averin wrote:
> /**
> + * pskb_realloc_headroom - reallocate header of &sk_buff
> + * @skb: buffer to reallocate
> + * @headroom: needed headroom
> + *
> + * Unlike skb_realloc_headroom, this one does not allocate a new skb
> + * if possible; copies skb->sk to new skb as needed
> + * and frees original scb in case of failures.
> + *
> + * It expect increased headroom, and generates warning otherwise.
> + */
> +
> +struct sk_buff *pskb_realloc_headroom(struct sk_buff *skb, unsigned int headroom)

I saw you asked about naming in a different sub-thread, what do you
mean by "'pskb_expand_head' have different semantic"? AFAIU the 'p'
in pskb stands for "private", meaning not shared. In fact
skb_realloc_headroom() should really be pskb... but it predates the
'pskb' naming pattern by quite a while. Long story short
skb_expand_head() seems like a good name. With the current patch
pskb_realloc_headroom() vs skb_realloc_headroom() would give people
exactly the opposite intuition of what the code does.

\
 
 \ /
  Last update: 2021-07-12 19:53    [W:0.340 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site