Skip to content

Commit

Permalink
net: bridge: add missing counters to ndo_get_stats64 callback
Browse files Browse the repository at this point in the history
[ Upstream commit 7a30ecc ]

In br_forward.c and br_input.c fields dev->stats.tx_dropped and
dev->stats.multicast are populated, but they are ignored in
ndo_get_stats64.

Fixes: 2817273 ("net: fix 64 bit counters on 32 bit arches")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/58ea9963-77ad-a7cf-8dfd-fc95ab95f606@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
hkallweit authored and gregkh committed Nov 24, 2020
1 parent 67dd6d5 commit 3f8fc9b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/bridge/br_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ static void br_get_stats64(struct net_device *dev,
sum.rx_packets += tmp.rx_packets;
}

netdev_stats_to_stats64(stats, &dev->stats);
stats->tx_bytes = sum.tx_bytes;
stats->tx_packets = sum.tx_packets;
stats->rx_bytes = sum.rx_bytes;
Expand Down

0 comments on commit 3f8fc9b

Please sign in to comment.