aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/net
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2020-03-18 15:48:57 +0200
committerDavid S. Miller <davem@davemloft.net>2020-03-18 16:46:19 -0700
commitee4848ac1a8a6c1c167a399efe4114f717b3e921 (patch)
tree1a38f8e42b3c5334b2842430d95efb763a8833c4 /tools/testing/selftests/net
parentmlxsw: spectrum_cnt: Expose devlink resource occupancy for counters (diff)
downloadwireguard-linux-ee4848ac1a8a6c1c167a399efe4114f717b3e921.tar.xz
wireguard-linux-ee4848ac1a8a6c1c167a399efe4114f717b3e921.zip
selftests: mlxsw: Add tc action hw_stats tests
Add tests for mlxsw hw_stats types. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/net')
-rw-r--r--tools/testing/selftests/net/forwarding/lib.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index a4a7879b3bb9..977fc2b326a2 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -60,6 +60,15 @@ check_tc_chain_support()
fi
}
+check_tc_action_hw_stats_support()
+{
+ tc actions help 2>&1 | grep -q hw_stats
+ if [[ $? -ne 0 ]]; then
+ echo "SKIP: iproute2 too old; tc is missing action hw_stats support"
+ exit 1
+ fi
+}
+
if [[ "$(id -u)" -ne 0 ]]; then
echo "SKIP: need root privileges"
exit 0