selftests: mlxsw: Add a TBF selftest
authorPetr Machata <petrm@mellanox.com>
Fri, 24 Jan 2020 13:23:18 +0000 (15:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 25 Jan 2020 09:56:31 +0000 (10:56 +0100)
commite814c58d454d952778fbb70bd0e71564f8c49f28
treea231c9157bdc69e48e58a4c8b3d05dff94edc14c
parentc143139b7fd36cb66afb4423ac14a1efd8a45609
selftests: mlxsw: Add a TBF selftest

Add a test that runs traffic across a port throttled with TBF. The test
checks that the observed throughput is within +-5% from the installed
shaper.

To allow checking both the software datapath and the offloaded one, make
the test suitable for inclusion from driver-specific wrapper. Introduce
such wrappers for mlxsw.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/drivers/net/mlxsw/sch_tbf_ets.sh [new file with mode: 0755]
tools/testing/selftests/drivers/net/mlxsw/sch_tbf_prio.sh [new file with mode: 0755]
tools/testing/selftests/drivers/net/mlxsw/sch_tbf_root.sh [new file with mode: 0755]
tools/testing/selftests/net/forwarding/sch_tbf_core.sh [new file with mode: 0644]
tools/testing/selftests/net/forwarding/sch_tbf_ets.sh [new file with mode: 0755]
tools/testing/selftests/net/forwarding/sch_tbf_etsprio.sh [new file with mode: 0644]
tools/testing/selftests/net/forwarding/sch_tbf_prio.sh [new file with mode: 0755]
tools/testing/selftests/net/forwarding/sch_tbf_root.sh [new file with mode: 0755]