Subject: Re: [PATCH v3] net: dsa: realtek: rtl8365mb: remove ifOutDiscards from rx_packets

From: Jakub Kicinski <[email-masked]>
Date: Sun, 4 Jan 2026 07:31:01 -0800

On Sat, 3 Jan 2026 20:17:49 +0100 Mieczyslaw Nalewaj wrote:
> 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

12 characters of the hash in the fixes tag is enough, and don't wrap it.

>   ("net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC")
> 
> Signed-off-by: Mieczyslaw Nalewaj <[email-masked]>
> ---
>   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] +

Patch seems to make sense but it's mangled by your email client.
Please try resending with git send-email. Also please have a read of:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html
-- 
pw-bot: cr