Lines Matching +full:1 +full:br +full:- +full:100
2 # SPDX-License-Identifier: GPL-2.0
11 # +--------------------------+ +--------------------------+
16 # +-----|--------------------+ +-----|--------------------+
18 # +-----|------------------------------------------------|--------------------+
20 # | +--|------------------------------------------------|----------------+ |
22 # | | BR | |
26 # | +--------------------------------|-----------------------------------+ |
28 # +-----------------------------------|---------------------------------------+
30 # +-----|--------------------+
35 # +--------------------------+
57 tc qdisc replace dev $h1 root handle 1: tbf \
58 rate 10Mbit burst 10K limit 1M
94 ip link add dev br up type bridge
95 ip link set dev $swp1 up master br
96 ip link set dev $swp2 up master br
97 ip link set dev $swp3 up master br
103 tc qdisc replace dev $swp3 root handle 1: tbf \
104 rate 10Mbit burst 10K limit 1M
120 ip link del dev br
158 ping_test $h1 192.0.2.3 " from host 1"
184 local proto=$1; shift
185 local pkts=$1; shift
187 $MZ $h2 -p $PKTSZ -a own -b $h3_mac -A 192.0.2.2 -B 192.0.2.3 -t $proto -q -c $pkts "$@"
191 # success. After 10 failed attempts it bails out and returns 1. It dumps the
195 local size=$1; shift
196 local proto=$1; shift
202 local diff=$((size - cur))
203 local pkts=$(((diff + PKTSZ - 1) / PKTSZ))
210 return 1
214 sleep 1
220 local cond=$1; shift
228 local nmarked_d=$((nmarked_1 - nmarked_0))
229 local npackets_d=$((npackets_1 - npackets_0))
230 local pct=$((100 * nmarked_d / npackets_d))
238 local cond=$1; shift
246 local nmirrored_d=$((nmirrored_1 - nmirrored_0))
247 local npackets_d=$((npackets_1 - npackets_0))
248 local pct=$((100 * nmirrored_d / npackets_d))
256 local name=$1; shift
257 local limit=$1; shift
261 # Build the below-the-limit backlog using UDP. We could use TCP just
272 # Now push TCP, because non-TCP traffic would be early-dropped after the
285 local limit=$1; shift
288 $MZ $h1 -p $PKTSZ -A 192.0.2.1 -B 192.0.2.3 -c 0 \
289 -a own -b $h3_mac -t tcp -q tos=0x01 &
290 sleep 1
299 check_fail $? "UDP traffic went into backlog instead of being early-dropped"
300 log_test "$name backlog > limit: UDP early-dropped"
303 sleep 1
308 local limit=$1; shift
311 $MZ $h1 -p $PKTSZ -A 192.0.2.1 -B 192.0.2.3 -c 0 \
312 -a own -b $h3_mac -t tcp -q tos=0x01 &
313 sleep 1
322 check_err $? "UDP traffic was early-dropped instead of getting into backlog"
326 sleep 1
331 local limit=$1; shift
335 # Use ECN-capable TCP to verify there's no marking even though the queue
337 $MZ $h1 -p $PKTSZ -A 192.0.2.1 -B 192.0.2.3 -c 0 \
338 -a own -b $h3_mac -t tcp -q tos=0x01 &
351 check_fail $? "Traffic went into backlog instead of being early-dropped"
357 sleep 1
362 local limit=$1; shift
370 $MZ $h1 -p $PKTSZ -A 192.0.2.1 -B 192.0.2.3 -c 0 \
371 -a own -b $h3_mac -t udp -q &
372 sleep 1
383 send_packets udp 100
384 sleep 1
386 ((now >= base + 100))
387 check_err $? "Dropped packets not observed: 100 expected, $((now - base)) seen"
392 send_packets udp 100
393 sleep 1
396 check_err $? "Dropped packets still observed: 0 expected, $((now - base)) seen"
401 sleep 1
406 local limit=$1; shift
411 $MZ $h1 -p $PKTSZ -A 192.0.2.1 -B 192.0.2.3 -c 0 \
412 -a own -b $h3_mac -t tcp -q tos=0x01 &
413 sleep 1
433 sleep 1
438 local -a args=("$@")
440 tc qdisc replace dev $swp3 parent 1:1 handle 11: red \
441 limit 1M avpkt $PKTSZ probability 1 \
442 min $BACKLOG max $((BACKLOG + 1)) burst 38 "${args[@]}"
443 sleep 1
448 tc qdisc del dev $swp3 parent 1:1