]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: forwarding: sch_ets: Add test coverage for ETS Qdisc
authorPetr Machata <petrm@mellanox.com>
Wed, 18 Dec 2019 14:55:22 +0000 (14:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Dec 2019 21:32:30 +0000 (13:32 -0800)
commit4c1126403e901370df91e838afb3522dc64b718f
tree92bc3ba0d987123053ea681289a1c4d67578c72c
parent72ff5dcf718359297919ed1a794d326a56ca21b4
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>
tools/testing/selftests/drivers/net/mlxsw/qos_lib.sh
tools/testing/selftests/drivers/net/mlxsw/sch_ets.sh [new file with mode: 0755]
tools/testing/selftests/net/forwarding/sch_ets.sh [new file with mode: 0755]
tools/testing/selftests/net/forwarding/sch_ets_core.sh [new file with mode: 0644]
tools/testing/selftests/net/forwarding/sch_ets_tests.sh [new file with mode: 0644]