• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0-or-later
3# Copyright (c) 2018 Oracle and/or its affiliates. All Rights Reserved.
4
5TST_SETUP="setup"
6TST_TESTFUNC="do_test"
7TST_CLEANUP="cleanup"
8TST_MIN_KVER="4.13"
9TST_TEST_DATA="pfifo_fast codel pfifo fq hfsc hhf htb pie prio sfb sfq"
10
11. tcp_cc_lib.sh
12
13TST_CLEANUP="cleanup"
14
15cleanup()
16{
17	tc qdisc del dev $(tst_iface) root netem > /dev/null 2>&1
18
19	tcp_cc_cleanup
20}
21
22setup()
23{
24	tcp_cc_check_support bbr
25	tcp_cc_setup
26
27	local emu_opts="delay 5ms 1ms 20% loss 0.3% ecn corrupt \
280.1% reorder 93% 50% limit 10000"
29
30	tst_res TINFO "emulate congestion with packet $emu_opts"
31	ROD tc qdisc add dev $(tst_iface) root netem $emu_opts
32}
33
34do_test()
35{
36	tcp_cc_set_qdisc $2 || return
37	tcp_cc_test01 bbr -50
38}
39
40tst_run
41