Re: [PATCH net-next] skbuff: Add helper function for head_frag and pfmemalloc

From: Alexander Lobakin
Date: Mon Nov 15 2021 - 07:27:57 EST


From: Yajun Deng <yajun.deng@xxxxxxxxx>
Date: Mon, 15 Nov 2021 16:57:08 +0800

> This series of build_skb() has the same code, add skb_set_head_frag_pfmemalloc()
> for it, at the same time, in-line skb_propagate_pfmemalloc().
>
> Signed-off-by: Yajun Deng <yajun.deng@xxxxxxxxx>
> ---
> include/linux/skbuff.h | 19 ++++++++++++-------
> net/core/skbuff.c | 19 +++++--------------
> 2 files changed, 17 insertions(+), 21 deletions(-)

build_skb(), build_skb_around() and napi_build_skb() are 3-liners,
and all of their code is here in linux/skbuff.h. Would it make
sense to make them static inlines, and export their "__"
counterparts instead?

Thanks,
Al