diff options
author | Jiri Pirko <jiri@mellanox.com> | 2020-03-18 16:48:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-19 02:46:19 +0300 |
commit | ee4848ac1a8a6c1c167a399efe4114f717b3e921 (patch) | |
tree | 1a38f8e42b3c5334b2842430d95efb763a8833c4 /tools/testing/selftests/net | |
parent | 4e145fc6eba217943b2972d4db8f32f62bfdf1b3 (diff) | |
download | linux-ee4848ac1a8a6c1c167a399efe4114f717b3e921.tar.xz |
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.sh | 9 |
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 |