net: tn40xx: add per queue netdev-genl stats support
authorFUJITA Tomonori <fujita.tomonori@gmail.com>
Sat, 6 Jul 2024 06:43:24 +0000 (15:43 +0900)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 9 Jul 2024 11:26:57 +0000 (13:26 +0200)
commit6c2a4c2f70e5b6c9c57d6d8adc893c55ba318613
tree1a1094fd3bf42005c7c6c054be5392738656eb78
parent417d88189ccf645a157a3dc3da7e894c1f2829d1
net: tn40xx: add per queue netdev-genl stats support

Add support for the netdev-genl per queue stats API.

./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
--dump qstats-get --json '{"scope":"queue"}'
[{'ifindex': 4,
  'queue-id': 0,
  'queue-type': 'rx',
  'rx-alloc-fail': 0,
  'rx-bytes': 266613,
  'rx-packets': 3325},
 {'ifindex': 4,
  'queue-id': 0,
  'queue-type': 'tx',
  'tx-bytes': 142823367,
  'tx-packets': 2387}]

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20240706064324.137574-1-fujita.tomonori@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/tehuti/tn40.c
drivers/net/ethernet/tehuti/tn40.h