diff options
author | Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> | 2018-07-23 23:36:04 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-03 07:48:05 +0200 |
commit | 4c42c0bfd065cda8ee87b8455af1d18814a79177 (patch) | |
tree | d0e4a4e662caf42b32ba10cd857362e77d80c040 /net/core/dev.c | |
parent | a21b4b34c8901916bb525e531584b3d475af912f (diff) |
virtio_net: Fix incosistent received bytes counter
[ Upstream commit ecbc42ca5d665e9238a4cdb595024d2e6cf87f2d ]
When received packets are dropped in virtio_net driver, received packets
counter is incremented but bytes counter is not.
As a result, for instance if we drop all packets by XDP, only received
is counted and bytes stays 0, which looks inconsistent.
IMHO received packets/bytes should be counted if packets are produced by
the hypervisor, like what common NICs on physical machines are doing.
So fix the bytes counter.
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core/dev.c')
0 files changed, 0 insertions, 0 deletions