[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <714df4e3-224c-4999-8132-fdbee4cfaec8@yahoo.com>
Date: Sat, 3 Jan 2026 20:12:10 +0100
From: Mieczyslaw Nalewaj <namiltd@...oo.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"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>,
"davem@...emloft.net" <davem@...emloft.net>
Subject: [PATCH v2] 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