Skip to content

Commit a6d0b83

Browse files
Doug Bergerdavem330
authored andcommitted
net: bcmgenet: correct per TX/RX ring statistics
The change to track net_device_stats per ring to better support SMP missed updating the rx_dropped member. The ndo_get_stats method is also needed to combine the results for ethtool statistics (-S) before filling in the ethtool structure. Fixes: 37a30b4 ("net: bcmgenet: Track per TX/RX rings statistics") Signed-off-by: Doug Berger <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9d3cdd4 commit a6d0b83

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/broadcom/genet/bcmgenet.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,8 @@ static void bcmgenet_get_ethtool_stats(struct net_device *dev,
934934
if (netif_running(dev))
935935
bcmgenet_update_mib_counters(priv);
936936

937+
dev->netdev_ops->ndo_get_stats(dev);
938+
937939
for (i = 0; i < BCMGENET_STATS_LEN; i++) {
938940
const struct bcmgenet_stats *s;
939941
char *p;
@@ -3156,6 +3158,7 @@ static struct net_device_stats *bcmgenet_get_stats(struct net_device *dev)
31563158
dev->stats.rx_packets = rx_packets;
31573159
dev->stats.rx_errors = rx_errors;
31583160
dev->stats.rx_missed_errors = rx_errors;
3161+
dev->stats.rx_dropped = rx_dropped;
31593162
return &dev->stats;
31603163
}
31613164

0 commit comments

Comments
 (0)