1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0-or-later 3# Copyright (c) 2015-2018 Oracle and/or its affiliates. All Rights Reserved. 4# 5# Author: Alexey Kodanev <alexey.kodanev@oracle.com> 6 7TST_SETUP="setup" 8TST_TESTFUNC="do_test" 9TST_CLEANUP="cleanup" 10TST_MIN_KVER="3.18" 11 12. tcp_cc_lib.sh 13 14cleanup() 15{ 16 tc qdisc del dev $(tst_iface) root netem loss 0.5% ecn 17 18 tcp_cc_cleanup 19} 20 21setup() 22{ 23 tcp_cc_check_support dctcp 24 tcp_cc_setup 25 26 tst_res TINFO "emulate congestion with packet loss 0.5% and ECN" 27 tc qdisc add dev $(tst_iface) root netem loss 0.5% ecn > /dev/null 2>&1 28 29 if [ $? -ne 0 ]; then 30 tst_brk TCONF "netem doesn't support ECN" 31 fi 32} 33 34do_test() 35{ 36 tcp_cc_test01 dctcp 10 37} 38 39tst_run 40