diff options
author | Petr Machata <petrm@mellanox.com> | 2019-12-18 14:55:22 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-18 13:32:30 -0800 |
commit | ddd3fd750ffee2c562fa88ea6ed1f90a02818303 (patch) | |
tree | 92bc3ba0d987123053ea681289a1c4d67578c72c /tools/testing/selftests/drivers/net/mlxsw/qos_lib.sh | |
parent | selftests: forwarding: Move start_/stop_traffic from mlxsw to lib.sh (diff) | |
download | linux-dev-ddd3fd750ffee2c562fa88ea6ed1f90a02818303.tar.xz linux-dev-ddd3fd750ffee2c562fa88ea6ed1f90a02818303.zip |
selftests: forwarding: sch_ets: Add test coverage for ETS Qdisc
This tests the newly-added ETS Qdisc. It runs two to three streams of
traffic, each with a different priority. ETS Qdisc is supposed to allocate
bandwidth according to the DRR algorithm and given weights. After running
the traffic for a while, counters are compared for each stream to check
that the expected ratio is in fact observed.
In order for the DRR process to kick in, a traffic bottleneck must exist in
the first place. In slow path, such bottleneck can be implemented by
wrapping the ETS Qdisc inside a TBF or other shaper. This might however
make the configuration unoffloadable. Instead, on HW datapath, the
bottleneck would be set up by lowering port speed and configuring shared
buffer suitably.
Therefore the test is structured as a core component that implements the
testing, with two wrapper scripts that implement the details of slow path
resp. fast path configuration.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/drivers/net/mlxsw/qos_lib.sh')
-rw-r--r-- | tools/testing/selftests/drivers/net/mlxsw/qos_lib.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/testing/selftests/drivers/net/mlxsw/qos_lib.sh b/tools/testing/selftests/drivers/net/mlxsw/qos_lib.sh index 75a3fb3b5663..a5937069ac16 100644 --- a/tools/testing/selftests/drivers/net/mlxsw/qos_lib.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/qos_lib.sh @@ -78,3 +78,31 @@ measure_rate() echo $ir $er return $ret } + +bail_on_lldpad() +{ + if systemctl is-active --quiet lldpad; then + + cat >/dev/stderr <<-EOF + WARNING: lldpad is running + + lldpad will likely configure DCB, and this test will + configure Qdiscs. mlxsw does not support both at the + same time, one of them is arbitrarily going to overwrite + the other. That will cause spurious failures (or, + unlikely, passes) of this test. + EOF + + if [[ -z $ALLOW_LLDPAD ]]; then + cat >/dev/stderr <<-EOF + + If you want to run the test anyway, please set + an environment variable ALLOW_LLDPAD to a + non-empty string. + EOF + exit 1 + else + return + fi + fi +} |