diff options
author | Xuan Zhuo <xuanzhuo@linux.alibaba.com> | 2024-04-26 11:39:28 +0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-04-30 10:51:33 +0200 |
commit | d888f04c09bb2c2fc60f84ccba87a9ff727b13d4 (patch) | |
tree | 6ae0e99db5ddae2bd371c8b36930a65a9e8b323b /virt | |
parent | 0cfe71f45f420e412fda2395807a56c453a6e0b6 (diff) | |
download | lwn-d888f04c09bb2c2fc60f84ccba87a9ff727b13d4.tar.gz lwn-d888f04c09bb2c2fc60f84ccba87a9ff727b13d4.zip |
virtio-net: support queue stat
To enhance functionality, we now support reporting statistics through
the netdev-generic netlink (netdev-genl) queue stats interface. However,
this does not extend to all statistics, so a new field, qstat_offset,
has been introduced. This field determines which statistics should be
reported via netdev-genl queue stats.
Given that queue stats are retrieved individually per queue, it's
necessary for the virtnet_get_hw_stats() function to be capable of
fetching statistics for a specific queue.
As the document https://docs.kernel.org/next/networking/statistics.html#notes-for-driver-authors
We should not duplicate the stats which get reported via the netlink API in
ethtool. If the stats are for queue stat, that will not be reported by
ethtool -S.
python3 ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml
--dump qstats-get --json '{"scope": "queue"}'
[{'ifindex': 2,
'queue-id': 0,
'queue-type': 'rx',
'rx-bytes': 157844011,
'rx-csum-bad': 0,
'rx-csum-none': 0,
'rx-csum-unnecessary': 2195386,
'rx-hw-drop-overruns': 0,
'rx-hw-drop-ratelimits': 0,
'rx-hw-drops': 12964,
'rx-packets': 598929},
{'ifindex': 2,
'queue-id': 0,
'queue-type': 'tx',
'tx-bytes': 1938511,
'tx-csum-none': 0,
'tx-hw-drop-errors': 0,
'tx-hw-drop-ratelimits': 0,
'tx-hw-drops': 0,
'tx-needs-csum': 61263,
'tx-packets': 15515}]
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions