[6/6] network/tcp_cc: add new test bbr02
diff mbox series

Message ID 1526903310-2833-7-git-send-email-alexey.kodanev@oracle.com
State Accepted
Delegated to: Alexey Kodanev
Headers show
Series
  • network/tcp_cc: add new tests bbr01 and bbr02
Related show

Commit Message

Alexey Kodanev May 21, 2018, 11:48 a.m. UTC
Difference, comparing to bbr01:

* Uses different (not default) qdisc: pfifo_fast, codel, pfifo, fq, hfsc,
  hhf, htb, pie, prio, sfb and sfq.
* Emulates congestion not only with packet loss but with delay, corrupt
  and reorder.

The test expects that 'bbr' congestion-control algorithm not
significantly worse than 'cubic'.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
 runtest/net.features              |    3 ++
 testcases/network/tcp_cc/bbr02.sh |   45 +++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 0 deletions(-)
 create mode 100755 testcases/network/tcp_cc/bbr02.sh

Comments

Petr Vorel May 28, 2018, 4:21 a.m. UTC | #1
Hi Alexey,

> Difference, comparing to bbr01:

> * Uses different (not default) qdisc: pfifo_fast, codel, pfifo, fq, hfsc,
>   hhf, htb, pie, prio, sfb and sfq.
> * Emulates congestion not only with packet loss but with delay, corrupt
>   and reorder.

> The test expects that 'bbr' congestion-control algorithm not
> significantly worse than 'cubic'.

> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Acked-by: Petr Vorel <pvorel@suse.cz>
> ---

> +do_test()
> +{
> +	for q in $qdisc_list; do
> +		if tc qdisc add $q >/dev/null 2>&1; then
> +			tst_res TCONF "$q qdisc not supported"
> +			continue
> +		fi
Yes, this one would of using TST_TEST_DATA.


Kind regards,
Petr
Petr Vorel May 28, 2018, 5:45 a.m. UTC | #2
Hi Alexey,

> Difference, comparing to bbr01:

> * Uses different (not default) qdisc: pfifo_fast, codel, pfifo, fq, hfsc,
>   hhf, htb, pie, prio, sfb and sfq.
> * Emulates congestion not only with packet loss but with delay, corrupt
>   and reorder.

> The test expects that 'bbr' congestion-control algorithm not
> significantly worse than 'cubic'.

> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Acked-by: Petr Vorel <pvorel@suse.cz>

...
> +do_test()
> +{
> +	for q in $qdisc_list; do
> +		if tc qdisc add $q >/dev/null 2>&1; then
> +			tst_res TCONF "$q qdisc not supported"
> +			continue
> +		fi
Yes, this one would of using TST_TEST_DATA.


Kind regards,
Petr
Alexey Kodanev June 8, 2018, 1:42 p.m. UTC | #3
On 05/28/2018 07:21 AM, Petr Vorel wrote:
> Hi Alexey,
> 
>> Difference, comparing to bbr01:
> 
>> * Uses different (not default) qdisc: pfifo_fast, codel, pfifo, fq, hfsc,
>>   hhf, htb, pie, prio, sfb and sfq.
>> * Emulates congestion not only with packet loss but with delay, corrupt
>>   and reorder.
> 
>> The test expects that 'bbr' congestion-control algorithm not
>> significantly worse than 'cubic'.
> 
>> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
> Acked-by: Petr Vorel <pvorel@suse.cz>

...

>> +do_test()
>> +{
>> +	for q in $qdisc_list; do
>> +		if tc qdisc add $q >/dev/null 2>&1; then
>> +			tst_res TCONF "$q qdisc not supported"
>> +			continue
>> +		fi
> Yes, this one would of using TST_TEST_DATA.
> 

Thanks for the review Petr!

The patch-set applied and now using new TST_TEST_DATA.

Also I've added one more patch that checks support in kernel.
Petr Vorel June 8, 2018, 2 p.m. UTC | #4
Hi Alexey,

> Thanks for the review Petr!

> The patch-set applied and now using new TST_TEST_DATA.
Great. I cleanup it in patchwork.

> Also I've added one more patch that checks support in kernel.
Great. TCONF instead of TFAIL is always wanted :).


Kind regards,
Petr

Patch
diff mbox series

diff --git a/runtest/net.features b/runtest/net.features
index 732c053..eac1b2b 100644
--- a/runtest/net.features
+++ b/runtest/net.features
@@ -4,6 +4,9 @@ 
 bbr01 bbr01.sh
 bbr01_ipv6 bbr01.sh -6
 
+bbr02 bbr02.sh
+bbr02_ipv6 bbr02.sh -6
+
 bind_noport01 bind_noport01.sh
 bind_noport01_ipv6 bind_noport01.sh -6
 
diff --git a/testcases/network/tcp_cc/bbr02.sh b/testcases/network/tcp_cc/bbr02.sh
new file mode 100755
index 0000000..ca3a9b4
--- /dev/null
+++ b/testcases/network/tcp_cc/bbr02.sh
@@ -0,0 +1,45 @@ 
+#!/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"
+
+. tcp_cc_lib.sh
+
+TST_CLEANUP="cleanup"
+
+cleanup()
+{
+	tc qdisc del dev $(tst_iface) root netem
+
+	tcp_cc_cleanup
+}
+
+setup()
+{
+	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()
+{
+	for q in $qdisc_list; do
+		if tc qdisc add $q >/dev/null 2>&1; then
+			tst_res TCONF "$q qdisc not supported"
+			continue
+		fi
+
+		tcp_cc_set_qdisc $q
+		tcp_cc_test01 bbr -50
+	done
+}
+
+tst_run