2 # SPDX-License-Identifier: GPL-2.0
14 source sch_red_core.sh
16 # do_ecn_test first build 2/3 of the requested backlog and expects no marking,
17 # and then builds 3/2 of it and does expect marking. The values of $BACKLOG1 and
18 # $BACKLOG2 are far enough not to overlap, so that we can assume that if we do
19 # see (do not see) marking, it is actually due to the configuration of that one
20 # TC, and not due to configuration of the other TC leaking over.
28 tc qdisc add dev
$swp3 root handle
10: $QDISC \
29 bands
8 priomap
7 6 5 4 3 2 1 0
30 tc qdisc add dev
$swp3 parent
10:8 handle
108: red \
31 limit
1000000 min
$BACKLOG1 max $
((BACKLOG1
+ 1)) \
32 probability
1.0 avpkt
8000 burst
38 "${args[@]}"
33 tc qdisc add dev
$swp3 parent
10:7 handle
107: red \
34 limit
1000000 min
$BACKLOG2 max $
((BACKLOG2
+ 1)) \
35 probability
1.0 avpkt
8000 burst
63 "${args[@]}"
41 tc qdisc del dev
$swp3 parent
10:7
42 tc qdisc del dev
$swp3 parent
10:8
43 tc qdisc del dev
$swp3 root
50 do_ecn_test
10 $BACKLOG1
51 do_ecn_test
11 $BACKLOG2
58 install_qdisc ecn nodrop
60 do_ecn_nodrop_test
10 $BACKLOG1
61 do_ecn_nodrop_test
11 $BACKLOG2
70 do_red_test
10 $BACKLOG1
71 do_red_test
11 $BACKLOG2
80 # Note that the backlog numbers here do not correspond to RED
81 # configuration, but are arbitrary.
82 do_mc_backlog_test
10 $BACKLOG1
83 do_mc_backlog_test
11 $BACKLOG2
90 install_qdisc qevent early_drop block
10
92 do_drop_mirror_test
10 $BACKLOG1 early_drop
93 do_drop_mirror_test
11 $BACKLOG2 early_drop
100 install_qdisc qevent early_drop block
10
102 do_drop_trap_test
10 $BACKLOG1 early_drop
103 do_drop_trap_test
11 $BACKLOG2 early_drop