On Mon, 11 Mar 2024 18:48:45 +0800 Xuan Zhuo wrote: > On Thu, 7 Mar 2024 08:50:21 -0800, Jakub Kicinski <kuba@xxxxxxxxxx> wrote: > > CC: Willem and some driver folks for more input, context: extending > > https://lore.kernel.org/all/20240306195509.1502746-1-kuba@xxxxxxxxxx/ > > to cover virtio stats. > > > > On Tue, 27 Feb 2024 16:03:00 +0800 Xuan Zhuo wrote: > > > +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. > > > +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.