[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d2339247-19a6-4614-a91c-86d79c2b4d00@yahoo.com>
Date: Sat, 3 Jan 2026 20:17:49 +0100
From: Mieczyslaw Nalewaj <namiltd@...oo.com>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc: "linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"alsi@...g-olufsen.dk" <alsi@...g-olufsen.dk>,
"olteanv@...il.com" <olteanv@...il.com>, "kuba@...nel.org"
<kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
Andrew Lunn <andrew@...n.ch>, "davem@...emloft.net" <davem@...emloft.net>
Subject: [PATCH v3] net: dsa: realtek: rtl8365mb: remove ifOutDiscards from
rx_packets
rx_packets should report the number of frames successfully received:
unicast + multicast + broadcast. Subtracting ifOutDiscards (a TX
counter) is incorrect and can undercount RX packets. RX drops are
already reported via rx_dropped (e.g. etherStatsDropEvents), so
there is no need to adjust rx_packets.
This patch removes the subtraction of ifOutDiscards from rx_packets
in rtl8365mb_stats_update().
Fixes: 4af2950c50c8634ed2865cf81e607034f78b84aa
("net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC")
Signed-off-by: Mieczyslaw Nalewaj <namiltd@...oo.com>
---
drivers/net/dsa/realtek/rtl8365mb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/net/dsa/realtek/rtl8365mb.c
+++ b/drivers/net/dsa/realtek/rtl8365mb.c
@@ -2180,8 +2180,7 @@ static void rtl8365mb_stats_update(struc
stats->rx_packets = cnt[RTL8365MB_MIB_ifInUcastPkts] +
cnt[RTL8365MB_MIB_ifInMulticastPkts] +
- cnt[RTL8365MB_MIB_ifInBroadcastPkts] -
- cnt[RTL8365MB_MIB_ifOutDiscards];
+ cnt[RTL8365MB_MIB_ifInBroadcastPkts];
stats->tx_packets = cnt[RTL8365MB_MIB_ifOutUcastPkts] +
cnt[RTL8365MB_MIB_ifOutMulticastPkts] +
Powered by blists - more mailing lists