Re: [PATCH net-next 0/5] net: wangxun: improve statistics support

"[email protected]" <[email protected]>
Newsgroups org.kernel.vger.netdev
Message-ID <[email protected]>
Hi,

➜ PF
python3 -m pyynl.cli \ --spec /root/Work/mirror-net-next/Documentation/netlink/specs/netdev.yaml \ --dump qstats-get \ --json '{"ifindex":160,"scope":"queue"}' [{'ifindex': 160, 'queue-id': 0, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 16737, 'rx-csum-bad': 0, 'rx-csum-complete': 28, 'rx-packets': 61}, {'ifindex': 160, 'queue-id': 1, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 1507, 'rx-csum-bad': 0, 'rx-csum-complete': 28, 'rx-packets': 11}, {'ifindex': 160, 'queue-id': 2, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 0, 'rx-csum-bad': 0, 'rx-csum-complete': 28, 'rx-packets': 0}, {'ifindex': 160, 'queue-id': 3, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 5831, 'rx-csum-bad': 0, 'rx-csum-complete': 28, 'rx-packets': 17}, {'ifindex': 160, 'queue-id': 0, 'queue-type': 'tx', 'tx-bytes': 880, 'tx-packets': 8}, {'ifindex': 160, 'queue-id': 1, 'queue-type': 'tx', 'tx-bytes': 4672, 'tx-packets': 36}, {'ifindex': 160, 'queue-id': 2, 'queue-type': 'tx', 'tx-bytes': 6860, 'tx-packets': 20}, {'ifindex': 160, 'queue-id': 3, 'queue-type': 'tx', 'tx-bytes': 992, 'tx-packets': 16}]

➜ VF
python3 -m pyynl.cli --spec /root/Work/mirror-net-next/Documentation/netlink/specs/netdev.yaml --dump qstats-get --json '{"ifindex":236,"scope":"queue"}' [{'ifindex': 236, 'queue-id': 0, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 16836, 'rx-csum-bad': 0, 'rx-csum-complete': 0, 'rx-packets': 58}, {'ifindex': 236, 'queue-id': 1, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 1507, 'rx-csum-bad': 0, 'rx-csum-complete': 0, 'rx-packets': 11}, {'ifindex': 236, 'queue-id': 2, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 3448, 'rx-csum-bad': 0, 'rx-csum-complete': 0, 'rx-packets': 24}, {'ifindex': 236, 'queue-id': 3, 'queue-type': 'rx', 'rx-alloc-fail': 0, 'rx-bytes': 7546, 'rx-csum-bad': 0, 'rx-csum-complete': 0, 'rx-packets': 22}, {'ifindex': 236, 'queue-id': 0, 'queue-type': 'tx', 'tx-bytes': 0, 'tx-packets': 0}, {'ifindex': 236, 'queue-id': 1, 'queue-type': 'tx', 'tx-bytes': 2750, 'tx-packets': 25}, {'ifindex': 236, 'queue-id': 2, 'queue-type': 'tx', 'tx-bytes': 12671, 'tx-packets': 53}, {'ifindex': 236, 'queue-id': 3, 'queue-type': 'tx', 'tx-bytes': 1670, 'tx-packets': 25}]

 root @roy-System-Product-Name ➜ …/mirror-net-next/tools/testing/selftests     main ?3   15:54:46 
✘  python3 ./drivers/net/stats.py
TAP version 13
1..8
ok 1 stats.check_pause
ok 2 stats.check_fec
ok 3 stats.check_fec_hist
ok 4 stats.pkt_byte_sum
ok 5 stats.qstat_by_ifindex
ok 6 stats.check_down
ok 7 stats.procfs_hammer
# completed up/down cycles: 76
ok 8 stats.procfs_downup_hammer
# Totals: pass:8 fail:0 xfail:0 xpass:0 skip:0 error:0


> 2026年8月1日 07:44,Jakub Kicinski <[email protected]> 写道:
> 
> On Fri, 31 Jul 2026 15:49:53 +0800 Mengyuan Lou wrote:
>> This series improves statistics support for Wangxun drivers.
>> Currently, VF drivers do not periodically refresh software statistics,
>> do not expose per-queue statistics through the generic netdev statistics
>> interface, and do not provide ndo_get_stats64().
>> The first patch fixes the suspend/resume flow for wxvf so the service
>> task and device lifecycle are handled correctly. The second patch makes
>> wx_update_stats() safe for VF drivers by allowing it to cope with
>> temporarily missing queue pointers during queue reconfiguration.
>> Once periodic statistics updates are available, libwx can implement
>> netdev_stat_ops, allowing Wangxun drivers to expose standard per-queue
>> statistics through the generic netdev qstats infrastructure.
> 
> Were you able to run the qstats-related selftests against these devices?
> 
 I have tested these devices with netdev.yaml for pf/vf devices.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.