linux/drivers/net/ethernet/natsemi
Yeounsu Moon 93ab4881a4 net: natsemi: fix rx_dropped double accounting on netif_rx() failure
`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 `if (unlikely(!skb))`, but skip it after
`netif_rx()` errors.

Fixes: caf586e5f2 ("net: add a core netdev->rx_dropped counter")
Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250913060135.35282-3-yyyynoom@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-15 19:06:25 -07:00
..
jazzsonic.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
macsonic.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00
Makefile ethernet: natsemi: correct spelling 2018-03-06 11:14:08 -05:00
natsemi.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
ns83820.c net: natsemi: fix rx_dropped double accounting on netif_rx() failure 2025-09-15 19:06:25 -07:00
sonic.c net/sonic: use dma_mapping_error() for error check 2023-03-21 21:29:34 -07:00
sonic.h net: natsemi: Replace in_interrupt() usage. 2020-09-29 14:02:54 -07:00
xtsonic.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00