From: Simon Horman <horms@kernel.org>
To: Yeounsu Moon <yyyynoom@gmail.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: natsemi: fix `rx_dropped` double accounting on `netif_rx()` failure
Date: Fri, 12 Sep 2025 14:21:23 +0100 [thread overview]
Message-ID: <20250912132123.GB30363@horms.kernel.org> (raw)
In-Reply-To: <20250911053310.15966-2-yyyynoom@gmail.com>
On Thu, Sep 11, 2025 at 02:33:06PM +0900, Yeounsu Moon wrote:
> `netif_rx()` already increments `rx_dropped` core stat when it fails.
> The driver was also updating `ndev->stats.rx_dropped` in the same path.
> Since both are reported together via `ip -s -s` command, this resulted
> in drops being counted twice in user-visible stats.
>
> Keep the driver update on `skb_put()` failure, but skip it after
> `netif_rx()` errors.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
Thanks for your patch,
Thinking out loud: Adding use of ndev->stats to drivers that don't already
do so is discouraged. But here, an existing use is being fixed. And I agree
it is a fix. So this looks good to me.
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-09-12 13:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 5:33 [PATCH net] net: natsemi: fix `rx_dropped` double accounting on `netif_rx()` failure Yeounsu Moon
2025-09-12 13:21 ` Simon Horman [this message]
2025-09-12 14:01 ` Yeounsu Moon
2025-09-12 14:19 ` Eric Dumazet
2025-09-12 15:50 ` Yeounsu Moon
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=20250912132123.GB30363@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yyyynoom@gmail.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 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).