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)
commitddd3fd750ffee2c562fa88ea6ed1f90a02818303
tree92bc3ba0d987123053ea681289a1c4d67578c72c
parent4cf9b8f9929285b91f5f22652ad5175a2206303b
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]