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" 10 11cleanup() 12{ 13 tc qdisc del dev $(tst_iface) root netem loss 0.5% ecn 14 15 tcp_cc_cleanup 16} 17 18setup() 19{ 20 tcp_cc_check_support dctcp 21 tcp_cc_setup 22 23 tst_res TINFO "emulate congestion with packet loss 0.5% and ECN" 24 tc qdisc add dev $(tst_iface) root netem loss 0.5% ecn > /dev/null 2>&1 25 26 if [ $? -ne 0 ]; then 27 tst_brk TCONF "netem doesn't support ECN" 28 fi 29} 30 31do_test() 32{ 33 tcp_cc_test01 dctcp 10 34} 35 36. tcp_cc_lib.sh 37tst_run 38