lkml.org 
[lkml]   [2019]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [BUG] net: core: netif_receive_skb_list() crash on non-standard ptypes forwarding
From
Date
On 28/03/2019 10:03, Alexander Lobakin wrote:
> Here's a working possible fix for that, not sure if it can break anything
> though.
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 2b67f2aa59dd..fdcff29df915 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -5014,8 +5014,10 @@ static inline void __netif_receive_skb_list_ptype(struct list_head *head,
>     if (pt_prev->list_func != NULL)
>         pt_prev->list_func(head, pt_prev, orig_dev);
>     else
> -        list_for_each_entry_safe(skb, next, head, list)
> +        list_for_each_entry_safe(skb, next, head, list) {
> +            skb_list_del_init(skb);
>             pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
> +        }
> }
>
> static void __netif_receive_skb_list_core(struct list_head *head, bool pfmemalloc)
>
> Maybe you could look into this and find another/better solution (or I could
> submit this one if that's pretty enough).
That looks like the correct fix to me, go ahead and have a
Reviewed-by: Edward Cree <ecree@solarflare.com>

>
> BTW, great work with netif_receive_skb_list() -- I've got 70 Mbps gain (~15%)
> on my setup in comparsion to napi_gro_receive().
Nice!

-Ed

\
 
 \ /
  Last update: 2019-03-28 12:38    [W:2.561 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site