This patch avoids repeated configuration of netperf in multi mode when iterating over nperf_sizes. It's sufficient to configure it before the loop.
Additionally it fixes potential bug when only TCP_CRR is selected for multi mode. In that case the netperf won't be properly configured because the configuration remains in TCP_RR branch.
Signed-off-by: Jan Tluka jtluka@redhat.com --- .../phase3/short_lived_connections.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/recipes/regression_tests/phase3/short_lived_connections.py b/recipes/regression_tests/phase3/short_lived_connections.py index 9a701f4..8457e13 100644 --- a/recipes/regression_tests/phase3/short_lived_connections.py +++ b/recipes/regression_tests/phase3/short_lived_connections.py @@ -112,6 +112,17 @@ netperf_srv = ctl.get_module("Netperf", "bind" : m1_testiface.get_ip(0) })
+if nperf_mode == "multi": + netperf_cli_tcp_rr.unset_option("confidence") + netperf_cli_tcp_crr.unset_option("confidence") + + netperf_cli_tcp_rr.update_options({"num_parallel": nperf_num_parallel}) + netperf_cli_tcp_crr.update_options({"num_parallel": nperf_num_parallel}) + + # we have to use multiqueue qdisc to get appropriate data + m1.run("tc qdisc replace dev %s root mq" % m1_testiface.get_devname()) + m2.run("tc qdisc replace dev %s root mq" % m2_testiface.get_devname()) + ctl.wait(15)
# start netperf server @@ -122,17 +133,6 @@ for size in nperf_sizes.split(): if 'TCP_RR' in nperf_tests.split(): netperf_cli_tcp_rr.update_options({"testoptions": "-r %s" % size})
- if nperf_mode == "multi": - netperf_cli_tcp_rr.unset_option("confidence") - netperf_cli_tcp_crr.unset_option("confidence") - - netperf_cli_tcp_rr.update_options({"num_parallel": nperf_num_parallel}) - netperf_cli_tcp_crr.update_options({"num_parallel": nperf_num_parallel}) - - # we have to use multiqueue qdisc to get appropriate data - m1.run("tc qdisc replace dev %s root mq" % m1_testiface.get_devname()) - m2.run("tc qdisc replace dev %s root mq" % m2_testiface.get_devname()) - # prepare PerfRepo result for tcp_rr result_tcp_rr = perf_api.new_result("tcp_rr_id", "tcp_rr_result",
Thu, Dec 06, 2018 at 05:15:05PM CET, jtluka@redhat.com wrote:
This patch avoids repeated configuration of netperf in multi mode when iterating over nperf_sizes. It's sufficient to configure it before the loop.
Additionally it fixes potential bug when only TCP_CRR is selected for multi mode. In that case the netperf won't be properly configured because the configuration remains in TCP_RR branch.
Signed-off-by: Jan Tluka jtluka@redhat.com
.../phase3/short_lived_connections.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/recipes/regression_tests/phase3/short_lived_connections.py b/recipes/regression_tests/phase3/short_lived_connections.py index 9a701f4..8457e13 100644 --- a/recipes/regression_tests/phase3/short_lived_connections.py +++ b/recipes/regression_tests/phase3/short_lived_connections.py @@ -112,6 +112,17 @@ netperf_srv = ctl.get_module("Netperf", "bind" : m1_testiface.get_ip(0) })
+if nperf_mode == "multi":
- netperf_cli_tcp_rr.unset_option("confidence")
- netperf_cli_tcp_crr.unset_option("confidence")
- netperf_cli_tcp_rr.update_options({"num_parallel": nperf_num_parallel})
- netperf_cli_tcp_crr.update_options({"num_parallel": nperf_num_parallel})
- # we have to use multiqueue qdisc to get appropriate data
- m1.run("tc qdisc replace dev %s root mq" % m1_testiface.get_devname())
- m2.run("tc qdisc replace dev %s root mq" % m2_testiface.get_devname())
ctl.wait(15)
# start netperf server @@ -122,17 +133,6 @@ for size in nperf_sizes.split(): if 'TCP_RR' in nperf_tests.split(): netperf_cli_tcp_rr.update_options({"testoptions": "-r %s" % size})
if nperf_mode == "multi":
netperf_cli_tcp_rr.unset_option("confidence")
netperf_cli_tcp_crr.unset_option("confidence")
netperf_cli_tcp_rr.update_options({"num_parallel": nperf_num_parallel})
netperf_cli_tcp_crr.update_options({"num_parallel": nperf_num_parallel})
# we have to use multiqueue qdisc to get appropriate data
m1.run("tc qdisc replace dev %s root mq" % m1_testiface.get_devname())
m2.run("tc qdisc replace dev %s root mq" % m2_testiface.get_devname())
# prepare PerfRepo result for tcp_rr result_tcp_rr = perf_api.new_result("tcp_rr_id", "tcp_rr_result",
Pushed.
-Jan
lnst-developers@lists.fedorahosted.org