diff options
| author | 2025-11-14 19:12:09 +0100 | |
|---|---|---|
| committer | 2025-11-17 19:27:47 -0800 | |
| commit | 71388a9f331da20bab70e09bdf010f925ad7ce79 (patch) | |
| tree | 37362cc80f57c9e27e3300fda24a61c2fcec6b45 /drivers/net/ibm_emac/ibm_emac_debug.c | |
| parent | selftests: mptcp: join: dump stats from history (diff) | |
| download | wireguard-linux-71388a9f331da20bab70e09bdf010f925ad7ce79.tar.xz wireguard-linux-71388a9f331da20bab70e09bdf010f925ad7ce79.zip | |
selftests: mptcp: lib: get counters from nstat history
Before, 'nstat' was used to retrieve each individual counter: this means
querying 4 different sources from /proc/net and iterating over 100+
counters each time. Instead, the stats could be retrieved once, and the
output file could be parsed for each counter. Even better, such file is
already present: the nstat history file.
To be able to get this working, the nstat history file also needs to
contains zero counters too, so it is still possible to know if a counter
is missing or set to 0.
This also simplifies mptcp_connect.sh: instead of checking multiple
counters before and after a test to compute the difference, the stats
history files can be reset before each test, and nstat can display only
the difference.
mptcp_lib_get_counter() continues to work when no history file is
available: by fetching nstat directly, like before. This is the case in
diag.sh and userspace_pm.sh where there is no need to save the history
file. This is also the case in mptcp_join.sh, when 'run_tests' is
executed in the background: easier to continue fetching counters than
updating the history each time it is needed.
Note: 'nstat' is called with '-s' in mptcp_lib_nstat_get(), so this
helper can be called multiple times during the test if needed.
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20251114-net-next-mptcp-sft-count-cache-stats-timeout-v1-5-863cb04e1b7b@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ibm_emac/ibm_emac_debug.c')
0 files changed, 0 insertions, 0 deletions
