All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"edumazet@google.com" <edumazet@google.com>,
	"alsi@bang-olufsen.dk" <alsi@bang-olufsen.dk>,
	"olteanv@gmail.com" <olteanv@gmail.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	Andrew Lunn <andrew@lunn.ch>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [PATCH v3] net: dsa: realtek: rtl8365mb: remove ifOutDiscards from rx_packets
Date: Sun, 4 Jan 2026 07:31:01 -0800	[thread overview]
Message-ID: <20260104073101.2b3a0baa@kernel.org> (raw)
In-Reply-To: <d2339247-19a6-4614-a91c-86d79c2b4d00@yahoo.com>

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 <namiltd@yahoo.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] +

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

  reply	other threads:[~2026-01-04 15:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2114795695.8721689.1763312184906.ref@mail.yahoo.com>
2025-11-16 16:56 ` [PATCH] net: dsa: realtek: rtl8365mb: fix return value in rtl8365mb_phy_ocp_write Mietek N
2025-11-16 17:18   ` Mietek N
2025-11-16 19:32     ` Andrew Lunn
2025-11-16 20:09       ` Mietek N
2026-01-03 19:12       ` [PATCH v2] net: dsa: realtek: rtl8365mb: remove ifOutDiscards from rx_packets Mieczyslaw Nalewaj
2026-01-03 19:17     ` [PATCH v3] " Mieczyslaw Nalewaj
2026-01-04 15:31       ` Jakub Kicinski [this message]
2026-01-04 15:54         ` [PATCH v4] " Mieczyslaw Nalewaj
2026-01-04 17:01           ` Jakub Kicinski
2026-01-04 17:39             ` [PATCH v5] " Mieczyslaw Nalewaj
2026-01-04 17:52               ` Jakub Kicinski
2026-01-05  8:35                 ` Mieczyslaw Nalewaj
2026-01-05 14:23                   ` Andrew Lunn
2026-01-04 11:25     ` [PATCH] net: dsa: realtek: rtl8365mb: fix return value in rtl8365mb_phy_ocp_write Mieczyslaw Nalewaj
2026-01-04 21:11       ` Andrew Lunn

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=20260104073101.2b3a0baa@kernel.org \
    --to=kuba@kernel.org \
    --cc=alsi@bang-olufsen.dk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linus.walleij@linaro.org \
    --cc=namiltd@yahoo.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.