lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 21 Oct 2022 09:02:36 +0300
From:   Ilias Apalodimas <ilias.apalodimas@...aro.org>
To:     Yunsheng Lin <linyunsheng@...wei.com>
Cc:     davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, linuxarm@...neuler.org,
        pabeni@...hat.com, hawk@...nel.org
Subject: Re: [PATCH net-next] net: skb: move skb_pp_recycle() to skbuff.c

Hi Yungsheng

On Fri, 21 Oct 2022 at 05:58, Yunsheng Lin <linyunsheng@...wei.com> wrote:
>
> skb_pp_recycle() is only used by skb_free_head() in
> skbuff.c, so move it to skbuff.c.
>
> Signed-off-by: Yunsheng Lin <linyunsheng@...wei.com>
> ---
>  include/linux/skbuff.h | 7 -------
>  net/core/skbuff.c      | 7 +++++++
>  2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index 9fcf534f2d92..28a7b5fbc7b7 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -5048,12 +5048,5 @@ static inline void skb_mark_for_recycle(struct sk_buff *skb)
>  }
>  #endif
>
> -static inline bool skb_pp_recycle(struct sk_buff *skb, void *data)
> -{
> -       if (!IS_ENABLED(CONFIG_PAGE_POOL) || !skb->pp_recycle)
> -               return false;
> -       return page_pool_return_skb_page(virt_to_page(data));
> -}
> -
>  #endif /* __KERNEL__ */
>  #endif /* _LINUX_SKBUFF_H */
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 1d9719e72f9d..9b3b19816d2d 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -748,6 +748,13 @@ static void skb_clone_fraglist(struct sk_buff *skb)
>                 skb_get(list);
>  }
>
> +static bool skb_pp_recycle(struct sk_buff *skb, void *data)
> +{
> +       if (!IS_ENABLED(CONFIG_PAGE_POOL) || !skb->pp_recycle)
> +               return false;
> +       return page_pool_return_skb_page(virt_to_page(data));
> +}
> +

Any particular reason you are removing the inline hint here?  Doing it
like this will add an extra function call for every packet (assuming
the compiler decided to inline the previous version)

Thanks
/Ilias
>  static void skb_free_head(struct sk_buff *skb)
>  {
>         unsigned char *head = skb->head;
> --
> 2.33.0
>

Powered by blists - more mailing lists