virtio_net: Add TX stopped and wake counters
authorDaniel Jurgens <danielj@nvidia.com>
Fri, 10 May 2024 20:19:27 +0000 (23:19 +0300)
committerJakub Kicinski <kuba@kernel.org>
Mon, 13 May 2024 21:58:36 +0000 (14:58 -0700)
commitc39add9b24237a4b4d8455643af9db42ef08b40d
tree7cb6156eadd688eba7b1ae73f5d5de22590ee055
parentb56035101e1cdd9c4420ea5da17f09f87fb69285
virtio_net: Add TX stopped and wake counters

Add a tx queue stop and wake counters, they are useful for debugging.

$ ./tools/net/ynl/cli.py --spec netlink/specs/netdev.yaml \
--dump qstats-get --json '{"scope": "queue"}'
...
 {'ifindex': 13,
  'queue-id': 0,
  'queue-type': 'tx',
  'tx-bytes': 14756682850,
  'tx-packets': 226465,
  'tx-stop': 113208,
  'tx-wake': 113208},
 {'ifindex': 13,
  'queue-id': 1,
  'queue-type': 'tx',
  'tx-bytes': 18167675008,
  'tx-packets': 278660,
  'tx-stop': 8632,
  'tx-wake': 8632}]

Signed-off-by: Daniel Jurgens <danielj@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Link: https://lore.kernel.org/r/20240510201927.1821109-3-danielj@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/virtio_net.c