diff options
author | Ido Schimmel <idosch@mellanox.com> | 2020-03-30 22:38:32 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-30 17:54:59 -0700 |
commit | 9f3e63c5d69814a9df85f7f0fc77eac0765d4fba (patch) | |
tree | 3a4b1046c12981dfd0c83afdf09c017e92ca7822 /tools/testing/selftests/net | |
parent | mlxsw: spectrum_trap: Add support for setting of packet trap group parameters (diff) | |
download | wireguard-linux-9f3e63c5d69814a9df85f7f0fc77eac0765d4fba.tar.xz wireguard-linux-9f3e63c5d69814a9df85f7f0fc77eac0765d4fba.zip |
selftests: mlxsw: Add test cases for devlink-trap policers
Add test cases that verify that each registered packet trap policer:
* Honors that imposed limitations of rate and burst size
* Able to police trapped packets to the specified rate
* Able to police trapped packets to the specified burst size
* Able to be unbound from its trap group
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/devlink_lib.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/forwarding/devlink_lib.sh b/tools/testing/selftests/net/forwarding/devlink_lib.sh index c48645a344e2..155d48bd4d9e 100644 --- a/tools/testing/selftests/net/forwarding/devlink_lib.sh +++ b/tools/testing/selftests/net/forwarding/devlink_lib.sh @@ -457,6 +457,12 @@ devlink_trap_group_policer_get() | jq '.[][][]["policer"]' } +devlink_trap_policer_ids_get() +{ + devlink -j -p trap policer show \ + | jq '.[]["'$DEVLINK_DEV'"][]["policer"]' +} + devlink_port_by_netdev() { local if_name=$1 |