From: Edward Cree <ecree@solarflare.com>
To: Alexander Lobakin <alobakin@dlink.ru>
Cc: "David S. Miller" <davem@davemloft.net>,
Jiri Pirko <jiri@mellanox.com>,
Ido Schimmel <idosch@mellanox.com>,
Petr Machata <petrm@mellanox.com>,
Alexander Duyck <alexander.h.duyck@intel.com>,
Amritha Nambiar <amritha.nambiar@intel.com>,
Li RongQing <lirongqing@baidu.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [BUG] net: core: netif_receive_skb_list() crash on non-standard ptypes forwarding
Date: Thu, 28 Mar 2019 11:37:00 +0000 [thread overview]
Message-ID: <61211987-2c8b-12b2-54cc-5ee23e2d0da9@solarflare.com> (raw)
In-Reply-To: <1553767399.1271.1@dlink.ru>
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
next prev parent reply other threads:[~2019-03-28 11:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-28 10:03 Alexander Lobakin
2019-03-28 11:37 ` Edward Cree [this message]
2019-03-28 11:56 ` Alexander Lobakin
2019-03-28 12:29 ` Edward Cree
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61211987-2c8b-12b2-54cc-5ee23e2d0da9@solarflare.com \
--to=ecree@solarflare.com \
--cc=alexander.h.duyck@intel.com \
--cc=alobakin@dlink.ru \
--cc=amritha.nambiar@intel.com \
--cc=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lirongqing@baidu.com \
--cc=netdev@vger.kernel.org \
--cc=petrm@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®