From: Heiner Kallweit Date: Fri, 13 Nov 2020 09:27:27 +0000 (+0100) Subject: net: bridge: add missing counters to ndo_get_stats64 callback X-Git-Tag: v4.4.246~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d343cc70e4069d128067373dd4565d757dc5050;p=thirdparty%2Fkernel%2Fstable.git net: bridge: add missing counters to ndo_get_stats64 callback [ Upstream commit 7a30ecc9237681bb125cbd30eee92bef7e86293d ] 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: 28172739f0a2 ("net: fix 64 bit counters on 32 bit arches") Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/58ea9963-77ad-a7cf-8dfd-fc95ab95f606@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 3d462fee9ed75..06e88c6bb5115 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -166,6 +166,7 @@ static struct rtnl_link_stats64 *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;