[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210712105310.46d265a5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Mon, 12 Jul 2021 10:53:10 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Vasily Averin <vvs@...tuozzo.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
David Ahern <dsahern@...nel.org>,
Eric Dumazet <eric.dumazet@...il.com>, netdev@...r.kernel.org,
Joerg Reuter <jreuter@...na.de>,
Ralf Baechle <ralf@...ux-mips.org>, linux-hams@...r.kernel.org,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
KP Singh <kpsingh@...nel.org>, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [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.
Powered by blists - more mailing lists