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 # +--------------------------+
61 tc qdisc replace dev $h1 root handle 1: tbf \
62 rate 10Mbit burst 10K limit 1M
86 ip link add dev br up type bridge
87 defer ip link del dev br
89 ip link set dev $swp1 up master br
92 ip link set dev $swp2 up master br
95 ip link set dev $swp3 up master br
107 tc qdisc replace dev $swp3 root handle 1: tbf \
108 rate 10Mbit burst 10K limit 1M
139 ping_test $h1 192.0.2.3 " from host 1"
165 local proto=$1; shift
166 local pkts=$1; shift
168 $MZ $h2 -p $PKTSZ -a own -b $h3_mac -A 192.0.2.2 -B 192.0.2.3 -t $proto -q -c $pkts "$@"
172 # success. After 10 failed attempts it bails out and returns 1. It dumps the
176 local size=$1; shift
177 local proto=$1; shift
183 local diff=$((size - cur))
184 local pkts=$(((diff + PKTSZ - 1) / PKTSZ))
191 return 1
195 sleep 1
201 local cond=$1; shift
209 local nmarked_d=$((nmarked_1 - nmarked_0))
210 local npackets_d=$((npackets_1 - npackets_0))
211 local pct=$((100 * nmarked_d / npackets_d))
219 local cond=$1; shift
227 local nmirrored_d=$((nmirrored_1 - nmirrored_0))
228 local npackets_d=$((npackets_1 - npackets_0))
229 local pct=$((100 * nmirrored_d / npackets_d))
237 local name=$1; shift
238 local limit=$1; shift
242 # Build the below-the-limit backlog using UDP. We could use TCP just
253 # Now push TCP, because non-TCP traffic would be early-dropped after the
266 local limit=$1; shift
269 $MZ $h1 -p $PKTSZ -A 192.0.2.1 -B 192.0.2.3 -c 0 \
270 -a own -b $h3_mac -t tcp -q tos=0x01 &
272 sleep 1
281 check_fail $? "UDP traffic went into backlog instead of being early-dropped"
282 log_test "$name backlog > limit: UDP early-dropped"
287 local limit=$1; shift
290 $MZ $h1 -p $PKTSZ -A 192.0.2.1 -B 192.0.2.3 -c 0 \
291 -a own -b $h3_mac -t tcp -q tos=0x01 &
293 sleep 1
302 check_err $? "UDP traffic was early-dropped instead of getting into backlog"
308 local limit=$1; shift
312 # Use ECN-capable TCP to verify there's no marking even though the queue
314 $MZ $h1 -p $PKTSZ -A 192.0.2.1 -B 192.0.2.3 -c 0 \
315 -a own -b $h3_mac -t tcp -q tos=0x01 &
329 check_fail $? "Traffic went into backlog instead of being early-dropped"
337 local limit=$1; shift
345 $MZ $h1 -p $PKTSZ -A 192.0.2.1 -B 192.0.2.3 -c 0 \
346 -a own -b $h3_mac -t udp -q &
348 sleep 1
359 send_packets udp 100
360 sleep 1
362 ((now >= base + 100))
363 check_err $? "Dropped packets not observed: 100 expected, $((now - base)) seen"
368 send_packets udp 100
369 sleep 1
372 check_err $? "Dropped packets still observed: 0 expected, $((now - base)) seen"
379 local limit=$1; shift
384 $MZ $h1 -p $PKTSZ -A 192.0.2.1 -B 192.0.2.3 -c 0 \
385 -a own -b $h3_mac -t tcp -q tos=0x01 &
387 sleep 1
409 local -a args=("$@")
411 tc qdisc replace dev $swp3 parent 1:1 handle 11: red \
412 limit 1M avpkt $PKTSZ probability 1 \
413 min $BACKLOG max $((BACKLOG + 1)) burst 38 "${args[@]}"
414 sleep 1
419 tc qdisc del dev $swp3 parent 1:1