public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Lobakin <alobakin@dlink.ru>
To: Edward Cree <ecree@solarflare.com>
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 14:56:22 +0300	[thread overview]
Message-ID: <5b3ef488e40c31dfa2e8d62b94e4df55@dlink.ru> (raw)
In-Reply-To: <61211987-2c8b-12b2-54cc-5ee23e2d0da9@solarflare.com>

Edward Cree wrote 28.03.2019 14:37:
> 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>

Cool!
Do we need a "stable" mark in this case to propose it to LTS backports 
(4.20+, I suppose)?

>> 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

Regards,
ᚷ ᛖ ᚢ ᚦ ᚠ ᚱ

  reply	other threads:[~2019-03-28 11:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 10:03 [BUG] net: core: netif_receive_skb_list() crash on non-standard ptypes forwarding Alexander Lobakin
2019-03-28 11:37 ` Edward Cree
2019-03-28 11:56   ` Alexander Lobakin [this message]
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=5b3ef488e40c31dfa2e8d62b94e4df55@dlink.ru \
    --to=alobakin@dlink.ru \
    --cc=alexander.h.duyck@intel.com \
    --cc=amritha.nambiar@intel.com \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --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