bbr02.sh 753 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. TST_SETUP="setup"
  5. TST_TESTFUNC="do_test"
  6. TST_CLEANUP="cleanup"
  7. TST_MIN_KVER="4.13"
  8. TST_TEST_DATA="pfifo_fast codel pfifo fq hfsc hhf htb pie prio sfb sfq"
  9. . tcp_cc_lib.sh
  10. TST_CLEANUP="cleanup"
  11. cleanup()
  12. {
  13. tc qdisc del dev $(tst_iface) root netem > /dev/null 2>&1
  14. tcp_cc_cleanup
  15. }
  16. setup()
  17. {
  18. tcp_cc_check_support bbr
  19. tcp_cc_setup
  20. local emu_opts="delay 5ms 1ms 20% loss 0.3% ecn corrupt \
  21. 0.1% reorder 93% 50% limit 10000"
  22. tst_res TINFO "emulate congestion with packet $emu_opts"
  23. ROD tc qdisc add dev $(tst_iface) root netem $emu_opts
  24. }
  25. do_test()
  26. {
  27. tcp_cc_set_qdisc $2 || return
  28. tcp_cc_test01 bbr -50
  29. }
  30. tst_run