Re: [PATCH net-next v3 3/6] virtio_net: support device stats
From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-03-11 15:43:32
Also in:
virtualization
On Mon, 11 Mar 2024 18:48:45 +0800 Xuan Zhuo wrote:
On Thu, 7 Mar 2024 08:50:21 -0800, Jakub Kicinski [off-list ref] wrote:quoted
CC: Willem and some driver folks for more input, context: extending https://lore.kernel.org/all/20240306195509.1502746-1-kuba@kernel.org/ (local) to cover virtio stats. On Tue, 27 Feb 2024 16:03:00 +0800 Xuan Zhuo wrote:quoted
+static const struct virtnet_stat_desc virtnet_stats_rx_basic_desc[] = { + VIRTNET_STATS_DESC(rx, basic, packets), + VIRTNET_STATS_DESC(rx, basic, bytes),Covered.About "packets" and "bytes", here is coming from the hw device. Actually the driver also count "packets" and "bytes" in SW. So there are HW and SW versions. Do we need to distinguish them?
Yup, there are already separate counters defined for SW and HW packets / bytes. For the feature specific counters I don't think we need to have both SW and HW flavors defined. But for pure rx / tx packets / bytes users may want to see both.
quoted
quoted
+static const struct virtnet_stat_desc virtnet_stats_rx_gso_desc[] = { + VIRTNET_STATS_DESC(rx, gso, gso_packets), + VIRTNET_STATS_DESC(rx, gso, gso_bytes),I used the term "GSO" in conversations about Rx and it often confuses people. Let's use "GRO", so hw-gro-packets, and hw-gro-bytes ? Or maybe coalesce? "hw-rx-coalesce" ? That's quite a bit longer..GRO may also confuse people. I like hw-rx-coalesce-packets, hw-rx-coalesce-bytes.
FWIW the HW offload feature in ethtool -k is called 'rx-gro-hw', but we can use "hw-rx-coalesce-*" and mention the feature in the documentation.