]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: lib: Add a generic helper for obtaining HW stats
authorPetr Machata <petrm@nvidia.com>
Sun, 8 May 2022 08:08:22 +0000 (11:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 May 2022 10:46:20 +0000 (11:46 +0100)
commit8231ab2433bef5236793783978d7f142363089fc
tree5814a2b4eed84e3c394de3d7c95f70c1a77036a8
parentcc57947f93ff97c39f9dc79b1cf913a1b423dd60
selftests: lib: Add a generic helper for obtaining HW stats

The function get_l3_stats() from the test hw_stats_l3.sh will be useful for
any test that wishes to work with L3 stats. Furthermore, it is easy to
generalize to other HW stats suites (for when such are added). Therefore,
move the code to lib.sh, rewrite it to have the same interface as the other
stats-collecting functions, and generalize to take the name of the HW stats
suite to collect as an argument.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/hw_stats_l3.sh
tools/testing/selftests/net/forwarding/lib.sh