netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: soukjin.bae@samsung.com, Eric Dumazet <eric.dumazet@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: (2) [Kernel][NET] Bug report on packet defragmenting
Date: Wed, 7 Nov 2018 19:24:48 -0800	[thread overview]
Message-ID: <eca6b22e-1c8d-d62a-6632-c7e7ffb180c2@gmail.com> (raw)
In-Reply-To: <20181108020523epcms1p55a0c28d3e881a079231fe813258602f6@epcms1p5>



On 11/07/2018 06:05 PM, 배석진 wrote:
>  --------- Original Message ---------
> Sender : Eric Dumazet <eric.dumazet@gmail.com>
> Date   : 2018-11-08 10:44 (GMT+9)
> Title  : Re: [Kernel][NET] Bug report on packet defragmenting
>  
>> On 11/07/2018 05:29 PM, 배석진 wrote:
>>  
>>> If ipv6_defrag hook is not excuted simultaneously, then it's ok.
>>> ipv6_defrag hook can handle that. [exam 3]
>>  
>> This seems wrong.
>>  
>> This is the root cause, we should not try to work around it but fix it.
>>  
>> There is no guarantee that RSS/RPS/RFS can help here, packets can sit in per-cpu
>> backlogs long enough to reproduce the issue, if RX queues interrupts are spread
>> over many cpus.
>  
> 
> Dear Dumazet,
> 
> Even if rx irq be spread to overal cpu, hash will be made by src/des address.
> then they'll have a same hash and cpu. is it not enough?
> Did you mean that we need total solution for all steering method? not just only RPS?
> 

IPv6 defrag unit should work all the times, even if 10 cpus have to feed fragments for the same
datagram at the same time.

RPS is just a hint to spread packets on different cpus.

Basically we could have the following patch and everything must still work properly
(presumably at lower performance, if RPS/RFS is any good, of course)

diff --git a/net/core/dev.c b/net/core/dev.c
index 0ffcbdd55fa9ee545c807f2ed3fc178830e3075a..c1269bb0d6c86b097cfff2d8395d8cbf2d596537 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4036,7 +4036,7 @@ static int get_rps_cpu(struct net_device *dev, struct sk_buff *skb,
                goto done;
 
        skb_reset_network_header(skb);
-       hash = skb_get_hash(skb);
+       hash = prandom_u32();
        if (!hash)
                goto done;
 


Sure, it is better if RPS is smarter, but if there is a bug in IPv6 defrag unit
we must investigate and root-cause it.

  reply	other threads:[~2018-11-08 12:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181108012927epcms1p47f719c1908da64a378690362901644ee@epcms1p4>
2018-11-08  1:29 ` [Kernel][NET] Bug report on packet defragmenting 배석진
2018-11-08  1:43   ` Eric Dumazet
     [not found]   ` <CGME20181108012927epcms1p47f719c1908da64a378690362901644ee@epcms1p5>
2018-11-08  2:05     ` 배석진
2018-11-08  3:24       ` Eric Dumazet [this message]
2018-11-08  3:56         ` (2) " Eric Dumazet
     [not found]         ` <CGME20181108012927epcms1p47f719c1908da64a378690362901644ee@epcms1p6>
2018-11-08  4:10           ` 배석진
2018-11-08  4:26             ` (2) " Eric Dumazet
2018-11-08  6:13               ` Eric Dumazet
     [not found]               ` <CGME20181108012927epcms1p47f719c1908da64a378690362901644ee@epcms1p2>
2018-11-08  7:58                 ` 배석진
2018-11-08 15:12                   ` (2) " Eric Dumazet
     [not found]                   ` <CGME20181108012927epcms1p47f719c1908da64a378690362901644ee@epcms1p1>
2018-11-09  0:42                     ` 배석진
2018-11-09  1:58                       ` (2) " Eric Dumazet
2018-11-09  2:24                 ` 배석진

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=eca6b22e-1c8d-d62a-6632-c7e7ffb180c2@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=soukjin.bae@samsung.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;
as well as URLs for NNTP newsgroup(s).