WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / drivers / net / mlxsw / sch_red_root.sh
blobede9c38d3effec14287d468663c1051c82fe8088
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0
4 ALL_TESTS="
5 ping_ipv4
6 ecn_test
7 ecn_nodrop_test
8 red_test
9 mc_backlog_test
10 red_mirror_test
12 source sch_red_core.sh
14 BACKLOG=300000
16 install_qdisc()
18 local -a args=("$@")
20 tc qdisc add dev $swp3 root handle 108: red \
21 limit 1000000 min $BACKLOG max $((BACKLOG + 1)) \
22 probability 1.0 avpkt 8000 burst 38 "${args[@]}"
23 sleep 1
26 uninstall_qdisc()
28 tc qdisc del dev $swp3 root
31 ecn_test()
33 install_qdisc ecn
34 do_ecn_test 10 $BACKLOG
35 uninstall_qdisc
38 ecn_nodrop_test()
40 install_qdisc ecn nodrop
41 do_ecn_nodrop_test 10 $BACKLOG
42 uninstall_qdisc
45 red_test()
47 install_qdisc
48 do_red_test 10 $BACKLOG
49 uninstall_qdisc
52 mc_backlog_test()
54 install_qdisc
55 # Note that the backlog value here does not correspond to RED
56 # configuration, but is arbitrary.
57 do_mc_backlog_test 10 $BACKLOG
58 uninstall_qdisc
61 red_mirror_test()
63 install_qdisc qevent early_drop block 10
64 do_drop_mirror_test 10 $BACKLOG
65 uninstall_qdisc
68 trap cleanup EXIT
70 setup_prepare
71 setup_wait
73 bail_on_lldpad
74 tests_run
76 exit $EXIT_STATUS