diff options
author | Xuan Zhuo <xuanzhuo@linux.alibaba.com> | 2024-04-26 11:39:24 +0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-04-30 10:51:33 +0200 |
commit | 941168f8b40e50518a3bc6ce770a7062a5d99230 (patch) | |
tree | 9a4436568e1bc15414103a9493dd0433416af8c9 /drivers/gpu/ipu-v3 | |
parent | de6df26ffced76137349be241a579b4fffaf5703 (diff) | |
download | linux-941168f8b40e50518a3bc6ce770a7062a5d99230.tar.gz linux-941168f8b40e50518a3bc6ce770a7062a5d99230.tar.bz2 linux-941168f8b40e50518a3bc6ce770a7062a5d99230.zip |
virtio_net: support device stats
As the spec https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
make virtio-net support getting the stats from the device by ethtool -S
<eth0>.
NIC statistics:
rx0_packets: 582951
rx0_bytes: 155307077
rx0_drops: 0
rx0_xdp_packets: 0
rx0_xdp_tx: 0
rx0_xdp_redirects: 0
rx0_xdp_drops: 0
rx0_kicks: 17007
rx0_hw_packets: 2179409
rx0_hw_bytes: 510015040
rx0_hw_notifications: 0
rx0_hw_interrupts: 0
rx0_hw_needs_csum: 2179409
rx0_hw_ratelimit_bytes: 0
tx0_packets: 15361
tx0_bytes: 1918970
tx0_xdp_tx: 0
tx0_xdp_tx_drops: 0
tx0_kicks: 15361
tx0_timeouts: 0
tx0_hw_packets: 32272
tx0_hw_bytes: 4311698
tx0_hw_notifications: 0
tx0_hw_interrupts: 0
tx0_hw_ratelimit_bytes: 0
The follow stats are hidden, there are exported by the queue stat API
in the subsequent comment.
VIRTNET_STATS_DESC_RX(basic, drops)
VIRTNET_STATS_DESC_RX(basic, drop_overruns),
VIRTNET_STATS_DESC_TX(basic, drops),
VIRTNET_STATS_DESC_TX(basic, drop_malformed),
VIRTNET_STATS_DESC_RX(csum, csum_valid),
VIRTNET_STATS_DESC_RX(csum, csum_none),
VIRTNET_STATS_DESC_RX(csum, csum_bad),
VIRTNET_STATS_DESC_TX(csum, needs_csum),
VIRTNET_STATS_DESC_TX(csum, csum_none),
VIRTNET_STATS_DESC_RX(gso, gso_packets),
VIRTNET_STATS_DESC_RX(gso, gso_bytes),
VIRTNET_STATS_DESC_RX(gso, gso_packets_coalesced),
VIRTNET_STATS_DESC_RX(gso, gso_bytes_coalesced),
VIRTNET_STATS_DESC_TX(gso, gso_packets),
VIRTNET_STATS_DESC_TX(gso, gso_bytes),
VIRTNET_STATS_DESC_TX(gso, gso_segments),
VIRTNET_STATS_DESC_TX(gso, gso_segments_bytes),
VIRTNET_STATS_DESC_RX(speed, ratelimit_packets),
VIRTNET_STATS_DESC_TX(speed, ratelimit_packets),
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/gpu/ipu-v3')
0 files changed, 0 insertions, 0 deletions