From patchwork Fri Oct 19 01:08:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 149198 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2681459lji; Thu, 18 Oct 2018 18:11:24 -0700 (PDT) X-Google-Smtp-Source: ACcGV61v/G0Qt+oCMZnmcsuwNfMCO3l5/kxroPDjyVuRHDF1b84sZfIe58z43FI/9tc4ncA24ciW X-Received: by 2002:a17:902:a618:: with SMTP id u24-v6mr31774260plq.77.1539911484470; Thu, 18 Oct 2018 18:11:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539911484; cv=none; d=google.com; s=arc-20160816; b=LofSEFM7mCxiB803NTiJZ782n2omnWFmqsFnbBV7B1fNWaEKHwOn+KUPcJJwYHKTtG SUuoC3DZCWrWOor1rcvI7YtZo9hAAaZkciNiHWtbCrQJKqH3N6YXEmm2wCuh8T/afW7X rgQ1DttEDsmMqWnlRHaPla7p2wlk1BeKJvSR29q/IgW5dQ8goCnX74c7y1n76S4h6nHX MDQEHGAmBSxi3J5fhng/Bup6dcHWzWUR9WfTnI4182vtxlSPKif05TLQrLcn7uTAf7QZ pvxBJre1mOt5tFuIBnRRYcy6Y8VV/OKoKHHmc9CViGyTddWV4g7feg+qpPRqNFEtOJqA b+Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=mvsMdqlrZflUMcGarFKUW1cQ+K9e6pvoW52898rH0kU=; b=lFZxKV3xmh1d8s35W7kCbRMXlxS2UMrlWUXIbp0vuypoeD2waHnrIamRv1RJ2fk7UT PAY0JYwt93ad0k6Sh3GSdGk/JCQql8Hhyxp/+7gg48dRo7jIzhUa0nWKjTECrvcTi/lT You4SpD1XkqXEygLA+bOexrLktlGwyB67XkRIc+rXbOn32Iiz51UYAjFdoZz88m0cQ1a Y2/12C32ze58S9cqgn8PcMTro2xglgLgeg47g5VkEAEfRYda4g4cQA01+GtV0C0gMIZ6 WgIWP866SQAwGkHpKHoMoKtZ4iQ8jh8RQVzVRYRDVvh6JwSNJh3EA0dT5qx3fKs/2w5q fS/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="iUfIg/9o"; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33-v6si22893275plh.50.2018.10.18.18.11.24; Thu, 18 Oct 2018 18:11:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="iUfIg/9o"; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726647AbeJSJPF (ORCPT + 10 others); Fri, 19 Oct 2018 05:15:05 -0400 Received: from mail-yw1-f68.google.com ([209.85.161.68]:40587 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726245AbeJSJPF (ORCPT ); Fri, 19 Oct 2018 05:15:05 -0400 Received: by mail-yw1-f68.google.com with SMTP id l79-v6so12581212ywc.7 for ; Thu, 18 Oct 2018 18:11:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mvsMdqlrZflUMcGarFKUW1cQ+K9e6pvoW52898rH0kU=; b=iUfIg/9oAbi1aeXeSLTrR8n40Yflsjc1TkE1aFsY64WZz+Krw7ALnb4bIzWwOpFdz3 S6PpwvjwjOsOJzfMFB5yf97P15hCuj4QrbBdwgHt9UyluDO66qwpZM2Gl92sGMlOLXtj I9s3BHuV8FLWijHCNuSLTGpOVtOv+EKU7J9dU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mvsMdqlrZflUMcGarFKUW1cQ+K9e6pvoW52898rH0kU=; b=PSQDSPwsiGNTADZ5z7gL7ZAsTet9OGhwuu/vq2pPblnQnSxyXBCNrjme8QwjfpcIHL lrmUSpJZOhpp1PCwSGWW1kUz5evyysFILL9mRCikRko0P44mRhrlaUTpskheVAH9Hctc lVyrUQh6x5l58HHAGfSnJgUEX7wb9kBXEOHakoVFkwkOWpVrwZ+fTJsecSodw+d4HTSJ 3++FbEDXHLLWmRdAm1lx+4Z3lcqkLEwo0iHmTvr01Uacz+lIQUjMT04uFRf4VGmTMf9S dE0pLhpJowKcSIVN7N1K+aH18aeGdgAGhlekSAI72Xt2V03xs+hCyU7NnbkeiUTdYOcr PvKA== X-Gm-Message-State: ABuFfogvhohW6A+kU1tljUiLo8xbLXcbWgGt5DeLB2bW39M3tJvpknQ7 nXzQ/RXvDhTrl9VgMLfadHV8BFI92lk= X-Received: by 2002:a81:7cd:: with SMTP id 196-v6mr19929645ywh.434.1539911482018; Thu, 18 Oct 2018 18:11:22 -0700 (PDT) Received: from localhost ([121.95.100.191]) by smtp.gmail.com with ESMTPSA id n7-v6sm5481918ywb.8.2018.10.18.18.11.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Oct 2018 18:11:21 -0700 (PDT) From: masahisa.kojima@linaro.org To: netdev@vger.kernel.org Cc: ilias.apalodimas@linaro.org, jaswinder.singh@linaro.org, ard.biesheuvel@linaro.org, osaki.yoshitoyo@socionext.com, Masahisa Kojima Subject: [PATCH 3/3] net: socionext: Reset tx queue in ndo_stop Date: Fri, 19 Oct 2018 10:08:43 +0900 Message-Id: <20181019010843.3605-4-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20181019010843.3605-1-masahisa.kojima@linaro.org> References: <20181019010843.3605-1-masahisa.kojima@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Masahisa Kojima Without resetting tx queue in ndo_stop, packets and bytes count are not reset when the interface is down. Eventually, tx queue is exhausted and packets will not be sent out. Signed-off-by: Masahisa Kojima Signed-off-by: Yoshitoyo Osaki --- drivers/net/ethernet/socionext/netsec.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.14.2 diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c index e7faaf8be99e..4b32da76d577 100644 --- a/drivers/net/ethernet/socionext/netsec.c +++ b/drivers/net/ethernet/socionext/netsec.c @@ -954,6 +954,9 @@ static void netsec_uninit_pkt_dring(struct netsec_priv *priv, int id) dring->head = 0; dring->tail = 0; dring->pkt_cnt = 0; + + if (id == NETSEC_RING_TX) + netdev_reset_queue(priv->ndev); } static void netsec_free_dring(struct netsec_priv *priv, int id)