Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933370AbcK1Pb4 (ORCPT ); Mon, 28 Nov 2016 10:31:56 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33380 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932357AbcK1Pbr (ORCPT ); Mon, 28 Nov 2016 10:31:47 -0500 Message-ID: <1480347103.18162.58.camel@edumazet-glaptop3.roam.corp.google.com> Subject: Re: stmmac ethernet in kernel 4.4: coalescing related pauses? From: Eric Dumazet To: David Miller Cc: lsanfil@marvell.com, pavel@ucw.cz, peppe.cavallaro@st.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 28 Nov 2016 07:31:43 -0800 In-Reply-To: <20161128.095431.856183735501262965.davem@davemloft.net> References: <20161123105125.GA26394@amd> <20161128.095431.856183735501262965.davem@davemloft.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 661 Lines: 23 On Mon, 2016-11-28 at 09:54 -0500, David Miller wrote: > From: Lino Sanfilippo > Date: Mon, 28 Nov 2016 14:07:51 +0100 > > > Calling skb_orphan() in the xmit handler made this issue disappear. > > This is not the way to handle this problem. > > The solution is to free the SKBs in a timely manner after the > chip has transmitted the frame. Note that the 'pauses' described by Pavel are also caused by a too small SO_SNDBUF value on the UDP socket. An immediate fix, with no kernel change is to increase it. echo 1000000 >/proc/sys/net/core/wmem_default or val = 1000000; setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, sizeof(val));