linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Lobakin <alobakin@pm.me>
To: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: "Łukasz Stelmach" <l.stelmach@samsung.com>,
	"Alexander Lobakin" <alobakin@pm.me>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next] ax88796c: fix fetching error stats from percpu containers
Date: Sat, 23 Oct 2021 12:19:16 +0000	[thread overview]
Message-ID: <20211023121148.113466-1-alobakin@pm.me> (raw)

rx_dropped, tx_dropped, rx_frame_errors and rx_crc_errors are being
wrongly fetched from the target container rather than source percpu
ones.
No idea if that goes from the vendor driver or was brainoed during
the refactoring, but fix it either way.

Fixes: a97c69ba4f30e ("net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver")
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
---
 drivers/net/ethernet/asix/ax88796c_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/asix/ax88796c_main.c b/drivers/net/ethernet/asix/ax88796c_main.c
index cfc597f72e3d..91fa0499ea6a 100644
--- a/drivers/net/ethernet/asix/ax88796c_main.c
+++ b/drivers/net/ethernet/asix/ax88796c_main.c
@@ -672,10 +672,10 @@ static void ax88796c_get_stats64(struct net_device *ndev,
 		stats->tx_packets += tx_packets;
 		stats->tx_bytes   += tx_bytes;

-		rx_dropped      += stats->rx_dropped;
-		tx_dropped      += stats->tx_dropped;
-		rx_frame_errors += stats->rx_frame_errors;
-		rx_crc_errors   += stats->rx_crc_errors;
+		rx_dropped      += s->rx_dropped;
+		tx_dropped      += s->tx_dropped;
+		rx_frame_errors += s->rx_frame_errors;
+		rx_crc_errors   += s->rx_crc_errors;
 	}

 	stats->rx_dropped = rx_dropped;
--
2.33.1



             reply	other threads:[~2021-10-23 12:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-23 12:19 Alexander Lobakin [this message]
     [not found] ` <CGME20211025195411eucas1p1f3a6830d6d0fdaac54633a0c321a55a0@eucas1p1.samsung.com>
2021-10-25 19:54   ` [PATCH net-next] ax88796c: fix fetching error stats from percpu containers Lukasz Stelmach
2021-10-26  2:23     ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211023121148.113466-1-alobakin@pm.me \
    --to=alobakin@pm.me \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=l.stelmach@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).