From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [net-next, PATCH 1/2] net: socionext: correctly recover txq after being full Date: Sat, 15 Dec 2018 13:15:38 -0800 (PST) Message-ID: <20181215.131538.45861666300286994.davem@davemloft.net> References: <1544777941-24083-1-git-send-email-ilias.apalodimas@linaro.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, jaswinder.singh@linaro.org, ard.biesheuvel@linaro.org, masami.hiramatsu@linaro.org, masahisa.kojima@linaro.org To: ilias.apalodimas@linaro.org Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:55786 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727206AbeLOVPj (ORCPT ); Sat, 15 Dec 2018 16:15:39 -0500 In-Reply-To: <1544777941-24083-1-git-send-email-ilias.apalodimas@linaro.org> Sender: netdev-owner@vger.kernel.org List-ID: From: Ilias Apalodimas Date: Fri, 14 Dec 2018 10:59:00 +0200 > Running pktgen with packets sizes > 512b ends up in the interface Txq > getting stuck. > "netsec 522d0000.ethernet eth0: netsec_netdev_start_xmit: TxQFull!" > appears on dmesg but the interface never recovers. It requires an > ifconfig down/up to make the interface usable again. > > The reason that triggers this, is a race condition between > .ndo_start_xmit and the napi completion. The available budget is > calculated first and indicates the queue is full. Due to a costly > netif_err() the queue is not stopped in time while the napi completion > runs, clears the irq and frees up descriptors, thus the queue never wakes > up again. > > Fix this by moving the print after stopping the queue, make the print > ratelimited, add barriers and check for cleaned descriptors.. > > Signed-off-by: Ilias Apalodimas Applied.