net: igb: expose rx_dropped via ethtool -S
Subsystems (3)
PATCH 1/1 net: igb: expose rx_dropped via ethtool -S
Currently the igb driver does not reports RX dropped packets in the ethtool -S statistics output, even though this information is already available in struct rtnl_link_stats64.
This patch adds rx_dropped, so users can monitor dropped packet counts directly with ethtool.
--- drivers/net/ethernet/intel/igb/igb_ethtool.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/intel/igb/igb_ethtool.c +1 -0
@@ -81,6 +81,7 @@ static const struct igb_stats igb_gstrings_stats[] = { }static const struct igb_stats igb_gstrings_net_stats[] = {IGB_NETDEV_STAT (rx_errors), +IGB_NETDEV_STAT (rx_dropped),IGB_NETDEV_STAT (tx_errors),IGB_NETDEV_STAT (tx_dropped),IGB_NETDEV_STAT (rx_length_errors),
Signature · 1 line
2.43.0
Quoted 18 lines · Ranganath V N
Currently the igb driver does not reports RX dropped packets in the ethtool -S statistics output, even though this information is already available in struct
rtnl_link_stats64.This patch adds
rx_dropped, so users can monitor dropped packet counts directly with ethtool.Signed-off-by Ranganath V N <[email protected]>--- drivers/net/ethernet/intel/igb/igb_ethtool.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/intel/igb/igb_ethtool.c +0
-0
drivers/net/ethernet/intel/igb/igb_ethtool.c static const struct igb_stats igb_gstrings_stats[] = { · line 87
Quoted 7 lines
drivers/net/ethernet/intel/igb/igb_ethtool.c +1
-0@@ -81,6 +81,7 @@ static const struct igb_stats igb_gstrings_stats[] = { }static const struct igb_stats igb_gstrings_net_stats[] = {IGB_NETDEV_STAT (rx_errors), +IGB_NETDEV_STAT (rx_dropped),IGB_NETDEV_STAT (tx_errors),IGB_NETDEV_STAT (tx_dropped),IGB_NETDEV_STAT (rx_length_errors),
This stat is never used in the igb driver, what's the benefit of constant 0 value in the output?
Quoted 14 lines
Quoted 14 lines · Ranganath V N
Currently the igb driver does not reports RX dropped packets in the ethtool -S statistics output, even though this information is already available in struct
rtnl_link_stats64.This patch adds
rx_dropped, so users can monitor dropped packet counts directly with ethtool.Signed-off-by Ranganath V N <[email protected]>--- drivers/net/ethernet/intel/igb/igb_ethtool.c | 1 + 1 file changed, 1 insertion(+)
Quoted 15 lines
drivers/net/ethernet/intel/igb/igb_ethtool.c static const struct igb_stats igb_gstrings_stats[] = { · line 87
Quoted 12 lines
drivers/net/ethernet/intel/igb/igb_ethtool.c +1
-0@@ -81,6 +81,7 @@ static const struct igb_stats igb_gstrings_stats[] = { }static const struct igb_stats igb_gstrings_net_stats[] = {IGB_NETDEV_STAT (rx_errors), +IGB_NETDEV_STAT (rx_dropped),IGB_NETDEV_STAT (tx_errors),IGB_NETDEV_STAT (tx_dropped),IGB_NETDEV_STAT (rx_length_errors),This stat is never used in the igb driver, what's the benefit of constant 0 value in the output?
Hi,
I initially proposed exposing it, but after reviewing the driver, I realized that stats.rx_dropped is never updated in igb. Exposing it would always show 0.
Ixgbe behaves the same: the counter is present
but never incremented.But this patch wouldn't provide meaningful data.
Thanks again for your guidance.
Ranganath
Quoted 16 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Ranganath V N
Sent: Thursday, August 28, 2025 1:42 PM
To: Nguyen, Anthony L <[email protected]>; Kitszel, Przemyslaw <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; Ranganath V N <[email protected]>
Subject: [Intel-wired-lan] [PATCH] net: igb: exposerx_droppedvia ethtool -S
Quoted 1 line
Currently the igb driver does not reports RX dropped
Minor fix: s/reports/report/
Quoted 7 lines
packets in the ethtool -S statistics output, even though this information is already available in struct
rtnl_link_stats64.This patch adds
rx_dropped, so users can monitor dropped packet counts directly with ethtool.
Should it have Fixes: tag, what do you think?
Quoted 1 line
Signed-off-by Ranganath V N <[email protected]>
Looks good for me.
Quoted 20 lines
--- drivers/net/ethernet/intel/igb/igb_ethtool.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/intel/igb/igb_ethtool.c +1
-0@@ -81,6 +81,7 @@ static const struct igb_stats igb_gstrings_stats[] = { }static const struct igb_stats igb_gstrings_net_stats[] = {IGB_NETDEV_STAT (rx_errors), +IGB_NETDEV_STAT (rx_dropped),IGB_NETDEV_STAT (tx_errors),IGB_NETDEV_STAT (tx_dropped),
IGB_NETDEV_STAT(rx_length_errors),
--
2.43.0