From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Abeni Subject: Re: [RFC PATCH] net: don't keep lonely packets forever in the gro hash Date: Tue, 20 Nov 2018 16:42:48 +0100 Message-ID: References: <3c8b5aea0c812323d8e15b548789a1e240f499d7.1542709015.git.pabeni@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , Willem de Bruijn To: Eric Dumazet , netdev@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:47152 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727132AbeKUCMg (ORCPT ); Tue, 20 Nov 2018 21:12:36 -0500 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: Hi, On Tue, 2018-11-20 at 05:49 -0800, Eric Dumazet wrote: > > On 11/20/2018 02:17 AM, Paolo Abeni wrote: > > Eric noted that with UDP GRO and napi timeout, we could keep a single > > UDP packet inside the GRO hash forever, if the related NAPI instance > > calls napi_gro_complete() at an higher frequency than the napi timeout. > > Willem noted that even TCP packets could be trapped there, till the > > next retransmission. > > This patch tries to address the issue, flushing the oldest packets before > > scheduling the NAPI timeout. The rationale is that such a timeout should be > > well below a jiffy and we are not flushing packets eligible for sane GRO. > > > > Reported-by: Eric Dumazet > > Signed-off-by: Paolo Abeni > > --- > > Sending as RFC, as I fear I'm missing some relevant pieces. > > Also I'm unsure if this should considered a fixes for "udp: implement > > GRO for plain UDP sockets." or for "net: gro: add a per device gro flush timer" Thank you for your feedback! > Truth be told, relying on jiffies change is a bit fragile for HZ=100 or HZ=250 kernels. Yes, we have higher bound there. > See recent TCP commit that got rid of tcp_tso_should_defer() dependency on HZ/jiffies > > https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=a682850a114aef947da5d603f7fd2cfe7eabbd72 I'm unsure I follow correctly. Are you suggesting to use ns precision for skb aging in GRO? If so, could that be a separate change? (looks more invasive) Thanks, Paolo