virtio_net: Account for tx bytes and packets on sending xdp_frames
authorToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Thu, 31 Jan 2019 11:40:30 +0000 (20:40 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:47:23 +0000 (19:47 +0100)
commit9143e1dcad3693bbcff01a9b65fff30f25964e41
tree37687cd8997185e2341fcdf3131bdcd37348935d
parentc8ba1f7989c639358df5dcb2653b1958a4d30a41
virtio_net: Account for tx bytes and packets on sending xdp_frames

[ Upstream commit 546f28974d771b124fb0bf7b551b343888cf0419 ]

Previously virtnet_xdp_xmit() did not account for device tx counters,
which caused confusions.
To be consistent with SKBs, account them on freeing xdp_frames.

Reported-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/virtio_net.c