提交 9225ad6b 编写于 作者: H Heiner Kallweit 提交者: Yang Yingliang

net: bridge: add missing counters to ndo_get_stats64 callback

stable inclusion
from linux-4.19.160
commit b1197f5d6f532a3f82a66940c8cec44cf302bf6d

--------------------------------

[ Upstream commit 7a30ecc9 ]

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: 28172739 ("net: fix 64 bit counters on 32 bit arches")
Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/58ea9963-77ad-a7cf-8dfd-fc95ab95f606@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
上级 c14ec853
...@@ -215,6 +215,7 @@ static void br_get_stats64(struct net_device *dev, ...@@ -215,6 +215,7 @@ static void br_get_stats64(struct net_device *dev,
sum.rx_packets += tmp.rx_packets; sum.rx_packets += tmp.rx_packets;
} }
netdev_stats_to_stats64(stats, &dev->stats);
stats->tx_bytes = sum.tx_bytes; stats->tx_bytes = sum.tx_bytes;
stats->tx_packets = sum.tx_packets; stats->tx_packets = sum.tx_packets;
stats->rx_bytes = sum.rx_bytes; stats->rx_bytes = sum.rx_bytes;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册