From ee4848ac1a8a6c1c167a399efe4114f717b3e921 Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Wed, 18 Mar 2020 15:48:57 +0200 Subject: selftests: mlxsw: Add tc action hw_stats tests Add tests for mlxsw hw_stats types. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller --- tools/testing/selftests/net/forwarding/lib.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tools/testing/selftests/net') 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 -- cgit v1.2.3-59-g8ed1b