mbox series

[net-next,v7,0/8] virtio-net: support device stats

Message ID 20240426033928.77778-1-xuanzhuo@linux.alibaba.com (mailing list archive)
Headers show
Series virtio-net: support device stats | expand

Message

Xuan Zhuo April 26, 2024, 3:39 a.m. UTC
As the spec:

https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82

The virtio net supports to get device stats.

Please review.

Thanks.

v6:
    1. remove 'maps'. check stats by if-else.

v5:
    1. Fix some small problems in last version
    2. Not report stats that will be reported by netlink
    3. remove "_queue" from  ethtool -S

v4:
    1. Support per-queue statistics API
    2. Fix some small problems in last version

v3:
    1. rebase net-next

v2:
    1. fix the usage of the leXX_to_cpu()
    2. add comment to the structure virtnet_stats_map

v1:
    1. fix some definitions of the marco and the struct








Xuan Zhuo (8):
  virtio_net: introduce ability to get reply info from device
  virtio_net: introduce device stats feature and structures
  virtio_net: remove "_queue" from ethtool -S
  virtio_net: support device stats
  virtio_net: device stats helpers support driver stats
  virtio_net: add the total stats field
  netdev: add queue stats
  virtio-net: support queue stat

 Documentation/netlink/specs/netdev.yaml |  104 +++
 drivers/net/virtio_net.c                | 1010 +++++++++++++++++++++--
 include/net/netdev_queues.h             |   27 +
 include/uapi/linux/netdev.h             |   19 +
 include/uapi/linux/virtio_net.h         |  143 ++++
 net/core/netdev-genl.c                  |   23 +-
 tools/include/uapi/linux/netdev.h       |   19 +
 7 files changed, 1284 insertions(+), 61 deletions(-)

Comments

Jakub Kicinski April 30, 2024, 1:48 a.m. UTC | #1
On Fri, 26 Apr 2024 11:39:20 +0800 Xuan Zhuo wrote:
> As the spec:
> 
> https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
> 
> The virtio net supports to get device stats.

These got marked as "not applicable" in netdev pw over the weekend, but
I think net-next is the right target here. So unless someone disagrees
or we need more reviews we shall apply these tomorrow.
patchwork-bot+netdevbpf@kernel.org April 30, 2024, 9:40 a.m. UTC | #2
Hello:

This series was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Fri, 26 Apr 2024 11:39:20 +0800 you wrote:
> As the spec:
> 
> https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82
> 
> The virtio net supports to get device stats.
> 
> Please review.
> 
> [...]

Here is the summary with links:
  - [net-next,v7,1/8] virtio_net: introduce ability to get reply info from device
    https://git.kernel.org/netdev/net-next/c/aff5b0e605b0
  - [net-next,v7,2/8] virtio_net: introduce device stats feature and structures
    https://git.kernel.org/netdev/net-next/c/34cfe8722136
  - [net-next,v7,3/8] virtio_net: remove "_queue" from ethtool -S
    https://git.kernel.org/netdev/net-next/c/de6df26ffced
  - [net-next,v7,4/8] virtio_net: support device stats
    https://git.kernel.org/netdev/net-next/c/941168f8b40e
  - [net-next,v7,5/8] virtio_net: device stats helpers support driver stats
    https://git.kernel.org/netdev/net-next/c/d86769b9d23c
  - [net-next,v7,6/8] virtio_net: add the total stats field
    https://git.kernel.org/netdev/net-next/c/d806e1ff79e6
  - [net-next,v7,7/8] netdev: add queue stats
    https://git.kernel.org/netdev/net-next/c/0cfe71f45f42
  - [net-next,v7,8/8] virtio-net: support queue stat
    https://git.kernel.org/netdev/net-next/c/d888f04c09bb

You are awesome, thank you!