aboutsummaryrefslogtreecommitdiff
path: root/testcases/network/tcp_cc/bbr02.sh
blob: b04c0c1731e097f1f229ce5e85755a2dcc44ed5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) 2018 Oracle and/or its affiliates. All Rights Reserved.

TST_SETUP="setup"
TST_TESTFUNC="do_test"
TST_CLEANUP="cleanup"
TST_MIN_KVER="4.13"
TST_TEST_DATA="pfifo_fast codel pfifo fq hfsc hhf htb pie prio sfb sfq"

. tcp_cc_lib.sh

TST_CLEANUP="cleanup"

cleanup()
{
	tc qdisc del dev $(tst_iface) root netem > /dev/null 2>&1

	tcp_cc_cleanup
}

setup()
{
	tcp_cc_check_support bbr
	tcp_cc_setup

	local emu_opts="delay 5ms 1ms 20% loss 0.3% ecn corrupt \
0.1% reorder 93% 50% limit 10000"

	tst_res TINFO "emulate congestion with packet $emu_opts"
	ROD tc qdisc add dev $(tst_iface) root netem $emu_opts
}

do_test()
{
	tcp_cc_set_qdisc $2 || return
	tcp_cc_test01 bbr -50
}

tst_run