Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2901109pxb; Tue, 24 Aug 2021 10:11:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuCrNBS3p0qQcD5DOa0KK4riVvjsDypNfr1gvBY5hRyno3cD8Zd1bU6Ayyf+8u5eS54BAN X-Received: by 2002:a5e:d80c:: with SMTP id l12mr23907171iok.120.1629825104654; Tue, 24 Aug 2021 10:11:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629825104; cv=none; d=google.com; s=arc-20160816; b=i8niBMfvnQylfoeSFhZRnmzaC3PqQUw/dFtYaGZ1OdwKLv2u3TIG9BDz4FxmgND2/c oL0K5nNni/9XFMPo+B0bHO5Qdd1bGdLvBVhfSEJZTXwJKmlvYa1Ri+cNKRSEjF4JUr0g ddEm9fIsNIWoBPAXR36r2YgPZHHPXYrMNnMFpiv3fpHMAl0J7QL9ukWzSBWygq591wW6 PMQzdVJqrGGBd18ZLwgxxQdoMRS6ylTUltKoMm5bDSi3B5HDpnaj9M5QXp40n66CXtCR 8pATgguz7ktDQaUPlP13QWuqHSHgriL2P8gGXI0GtLiNihsTnBnKnSqvq0nnwtxgaH+h DNkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BxEzhrjVOGRv8mSzY9NvnXf96yAVackiWgROpq0FYU4=; b=lf5o0kBTT+/gyhSRp2nAAlK9PCoOY9Etq6F95ytwvX5ZhMds4gzyWwGcH63kkijmR7 VEKbJOiAEi9UKk2rlEUvOOl3mb0U8jX+9Yn18r0dVmtGf8aAdXq2XozA6RWGfggstXPZ ox8EbMDjT62oC61jREl6Z6ik1DxwhaU9EdlvNBm+6o2MfAIzYGBjqBYpokQXZu1ipY0r nu4F6RDRIckRbIhR5RQ8/KFHysRHL7oPiiu2sOLy73OtfZjAGs8fGQrxDU4WrbmAbX/h D3XUu9uwbWvKDFCsraDAbcE/TpWfDDpWOh5723oKBbM6/Y3H/578gHDx9SoqLjKdoeoM Imrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YOcEiLxC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y20si235103jao.34.2021.08.24.10.11.33; Tue, 24 Aug 2021 10:11:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YOcEiLxC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239560AbhHXRLg (ORCPT + 99 others); Tue, 24 Aug 2021 13:11:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:47424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235276AbhHXRID (ORCPT ); Tue, 24 Aug 2021 13:08:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AF2B0611AF; Tue, 24 Aug 2021 17:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824401; bh=NQDmqClGMQmB4qpQYUTAFlQaoIEgbKoaecpkLZD+BJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YOcEiLxCHHnJ0RP/0LfyFQGeNXmURdk0wkC/DEzkjI5CXpCZ9YZZuRP/slOfts2o4 YItCzdRH+OFB4Bc4hG2CHNTlv7FSAKA5mSHdpCnmbyrmtl4ri3J/goYbGpYTfMakQC ExbNCXyHD8pBGYajF5/aLSvtD09RGuKMGmo1mtzNTsPogrnO5vkO1fGlAxRjEhRtMQ OVYlXXv57DPvvUJMQ4B9LFjge2M7EM7TLhE3VbRl6s26k5Nit1y/zGDMMu6MdArlgv OeJWjFswurpzyqU7QupHk3XnfFLipdzTiN9mTSEzoo9JSZ7HPgq1CNUDx0bOeduxUj bXqcW54VS4ZIA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jakub Kicinski , Michael Chan , Edwin Peer , Sasha Levin Subject: [PATCH 5.10 52/98] bnxt: count Tx drops Date: Tue, 24 Aug 2021 12:58:22 -0400 Message-Id: <20210824165908.709932-53-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210824165908.709932-1-sashal@kernel.org> References: <20210824165908.709932-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.10.61-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-5.10.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 5.10.61-rc1 X-KernelTest-Deadline: 2021-08-26T16:58+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jakub Kicinski [ Upstream commit fb9f7190092d2bbd1f8f0b1cc252732cbe99a87e ] Drivers should count packets they are dropping. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Reviewed-by: Michael Chan Reviewed-by: Edwin Peer Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index dd03e1e6279a..96b76b713dd8 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -406,6 +406,7 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev) i = skb_get_queue_mapping(skb); if (unlikely(i >= bp->tx_nr_rings)) { dev_kfree_skb_any(skb); + atomic_long_inc(&dev->tx_dropped); return NETDEV_TX_OK; } @@ -655,6 +656,7 @@ tx_kick_pending: if (txr->kick_pending) bnxt_txr_db_kick(bp, txr, txr->tx_prod); txr->tx_buf_ring[txr->tx_prod].skb = NULL; + atomic_long_inc(&dev->tx_dropped); return NETDEV_TX_OK; } -- 2.30.2