From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: (2) [Kernel][NET] Bug report on packet defragmenting Date: Wed, 7 Nov 2018 19:24:48 -0800 Message-ID: References: <91b43bec-cb19-b94b-8ee3-26979e3a19d1@gmail.com> <20181108012927epcms1p47f719c1908da64a378690362901644ee@epcms1p4> <20181108020523epcms1p55a0c28d3e881a079231fe813258602f6@epcms1p5> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit To: soukjin.bae@samsung.com, Eric Dumazet , "netdev@vger.kernel.org" Return-path: Received: from mail-pl1-f196.google.com ([209.85.214.196]:33485 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728652AbeKHM6M (ORCPT ); Thu, 8 Nov 2018 07:58:12 -0500 Received: by mail-pl1-f196.google.com with SMTP id w22-v6so5525948plk.0 for ; Wed, 07 Nov 2018 19:24:50 -0800 (PST) In-Reply-To: <20181108020523epcms1p55a0c28d3e881a079231fe813258602f6@epcms1p5> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/07/2018 06:05 PM, 배석진 wrote: > --------- Original Message --------- > Sender : Eric Dumazet > 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.