Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / testing / selftests / net / forwarding / sch_ets.sh
blob1f6f53e284b5e5bbc00998da7af3e4547513c740
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0
4 # A driver for the ETS selftest that implements testing in slowpath.
5 lib_dir=.
6 source sch_ets_core.sh
8 ALL_TESTS="
9 ping_ipv4
10 priomap_mode
11 ets_test_strict
12 ets_test_mixed
13 ets_test_dwrr
14 classifier_mode
15 ets_test_strict
16 ets_test_mixed
17 ets_test_dwrr
20 switch_create()
22 ets_switch_create
24 # Create a bottleneck so that the DWRR process can kick in.
25 tc qdisc add dev $swp2 root handle 1: tbf \
26 rate 1Gbit burst 1Mbit latency 100ms
27 defer tc qdisc del dev $swp2 root
28 PARENT="parent 1:"
31 # Callback from sch_ets_tests.sh
32 collect_stats()
34 local -a streams=("$@")
35 local stream
37 for stream in ${streams[@]}; do
38 qdisc_parent_stats_get $swp2 10:$((stream + 1)) .bytes
39 done
42 ets_run