]> git.baikalelectronics.ru Git - kernel.git/commit
net: lan966x: Fix the rx drop counter
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Wed, 19 Oct 2022 08:30:56 +0000 (10:30 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Oct 2022 04:08:54 +0000 (21:08 -0700)
commitbb1b405bf47afe8cb83a127dfadafb74cce35bcb
treeac8a1a93713c52c7feabc1e1cf6d1763ccb99766
parent2c064281573f15aea89b89050d6d2042452f599e
net: lan966x: Fix the rx drop counter

Currently the rx drop is calculated as the sum of multiple HW drop
counters. The issue is that not all the HW drop counters were added for
the rx drop counter. So if for example you have a police that drops
frames, they were not see in the rx drop counter.
Fix this by updating how the rx drop counter is calculated. It is
required to add also RX_RED_PRIO_* HW counters.

Fixes: 1f8224e1536b ("net: lan966x: add ethtool configuration and statistics")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Link: https://lore.kernel.org/r/20221019083056.2744282-1-horatiu.vultur@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c