This patch adds new alias to specify the processor id to use for netperf/netserver. If the alias is not specified the behavior does not change. To use it run:
lnst-ctl -A nperf_cpupin=5 run recipes/regression_tests/phase1/3_vlans.xml
Signed-off-by: Jan Tluka jtluka@redhat.com --- recipes/regression_tests/phase1/3_vlans.py | 10 +++++++--- recipes/regression_tests/phase1/3_vlans_over_bond.py | 9 +++++++-- recipes/regression_tests/phase1/bonding_test.py | 9 +++++++-- .../phase1/virtual_bridge_vlan_in_guest.py | 11 +++++++---- .../phase1/virtual_bridge_vlan_in_host.py | 11 +++++++---- recipes/regression_tests/phase2/3_vlans_over_team.py | 9 +++++++-- recipes/regression_tests/phase2/team_test.py | 17 +++++++++++++---- .../phase2/virtual_ovs_bridge_vlan_in_guest.py | 13 ++++++++----- .../phase2/virtual_ovs_bridge_vlan_in_host.py | 11 +++++++---- 9 files changed, 70 insertions(+), 30 deletions(-)
diff --git a/recipes/regression_tests/phase1/3_vlans.py b/recipes/regression_tests/phase1/3_vlans.py index 68974e7..3ce95d2 100644 --- a/recipes/regression_tests/phase1/3_vlans.py +++ b/recipes/regression_tests/phase1/3_vlans.py @@ -36,6 +36,7 @@ netperf_duration = int(ctl.get_alias("netperf_duration")) nperf_reserve = int(ctl.get_alias("nperf_reserve")) nperf_confidence = ctl.get_alias("nperf_confidence") nperf_max_runs = int(ctl.get_alias("nperf_max_runs")) +nperf_cpupin = ctl.get_alias("nperf_cpupin")
m1_phy1 = m1.get_interface("eth1") m1_phy1.set_mtu(mtu) @@ -110,14 +111,17 @@ for vlan1 in vlans: "iface": m1_vlan1.get_ip(1)})
netperf_srv.update_options({"bind": m1_vlan1.get_ip(0)}) - netperf_srv6.update_options({"bind": m1_vlan1.get_ip(1)})
+ p_opts = "-i %s -L %s" % (nperf_max_runs, m2_vlan2.get_ip(0)) + if nperf_cpupin: + p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin) + netperf_cli_tcp.update_options({"netperf_server": m1_vlan1.get_ip(0), - "netperf_opts": "-i %s -L %s" % (nperf_max_runs, m2_vlan2.get_ip(0))}) + "netperf_opts": p_opts })
netperf_cli_udp.update_options({"netperf_server": m1_vlan1.get_ip(0), - "netperf_opts": "-i %s -L %s" % (nperf_max_runs, m2_vlan2.get_ip(0))}) + "netperf_opts": p_opts })
netperf_cli_tcp6.update_options({"netperf_server": m1_vlan1.get_ip(1), "netperf_opts": "-i %s -L %s -6" % (nperf_max_runs, m2_vlan2.get_ip(1))}) diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py b/recipes/regression_tests/phase1/3_vlans_over_bond.py index d382036..31d2e6c 100644 --- a/recipes/regression_tests/phase1/3_vlans_over_bond.py +++ b/recipes/regression_tests/phase1/3_vlans_over_bond.py @@ -36,6 +36,7 @@ netperf_duration = int(ctl.get_alias("netperf_duration")) nperf_reserve = int(ctl.get_alias("nperf_reserve")) nperf_confidence = ctl.get_alias("nperf_confidence") nperf_max_runs = int(ctl.get_alias("nperf_max_runs")) +nperf_cpupin = ctl.get_alias("nperf_cpupin")
m1_bond = m1.get_interface("test_bond") m1_bond.set_mtu(mtu) @@ -115,11 +116,15 @@ for vlan1 in vlans:
netperf_srv6.update_options({"bind": m1_vlan1.get_ip(1)})
+ p_opts = "-i %s -L %s" % (nperf_max_runs, m2_vlan2.get_ip(0)) + if nperf_cpupin: + p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin) + netperf_cli_tcp.update_options({"netperf_server": m1_vlan1.get_ip(0), - "netperf_opts": "-i %s -L %s" % (nperf_max_runs, m2_vlan2.get_ip(0))}) + "netperf_opts": p_opts })
netperf_cli_udp.update_options({"netperf_server": m1_vlan1.get_ip(0), - "netperf_opts": "-i %s -L %s" % (nperf_max_runs, m2_vlan2.get_ip(0))}) + "netperf_opts": p_opts })
netperf_cli_tcp6.update_options({"netperf_server": m1_vlan1.get_ip(1), "netperf_opts": "-i %s -L %s -6" % (nperf_max_runs, m2_vlan2.get_ip(1))}) diff --git a/recipes/regression_tests/phase1/bonding_test.py b/recipes/regression_tests/phase1/bonding_test.py index 079a8fe..f842a55 100644 --- a/recipes/regression_tests/phase1/bonding_test.py +++ b/recipes/regression_tests/phase1/bonding_test.py @@ -36,6 +36,7 @@ netperf_duration = int(ctl.get_alias("netperf_duration")) nperf_reserve = int(ctl.get_alias("nperf_reserve")) nperf_confidence = ctl.get_alias("nperf_confidence") nperf_max_runs = int(ctl.get_alias("nperf_max_runs")) +nperf_cpupin = ctl.get_alias("nperf_cpupin")
test_if1 = m1.get_interface("test_if") test_if1.set_mtu(mtu) @@ -71,6 +72,10 @@ netperf_srv6 = ctl.get_module("Netperf", "netperf_opts" : " -6", })
+p_opts = "-i %s -L %s" % (nperf_max_runs, test_if2.get_ip(0)) +if nperf_cpupin: + p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin) + netperf_cli_tcp = ctl.get_module("Netperf", options = { "role" : "client", @@ -78,7 +83,7 @@ netperf_cli_tcp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, - "netperf_opts" : "-i %s -L %s" % (nperf_max_runs, test_if2.get_ip(0)) + "netperf_opts" : p_opts })
netperf_cli_udp = ctl.get_module("Netperf", @@ -88,7 +93,7 @@ netperf_cli_udp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, - "netperf_opts" : "-i %s -L %s" % (nperf_max_runs, test_if2.get_ip(0)) + "netperf_opts" : p_opts })
netperf_cli_tcp6 = ctl.get_module("Netperf", diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py index 81e4a25..041ce8a 100644 --- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py +++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py @@ -36,6 +36,7 @@ netperf_duration = int(ctl.get_alias("netperf_duration")) nperf_reserve = int(ctl.get_alias("nperf_reserve")) nperf_confidence = ctl.get_alias("nperf_confidence") nperf_max_runs = int(ctl.get_alias("nperf_max_runs")) +nperf_cpupin = ctl.get_alias("nperf_cpupin")
mtu = ctl.get_alias("mtu") enable_udp_perf = ctl.get_alias("enable_udp_perf") @@ -75,6 +76,10 @@ netperf_srv6 = ctl.get_module("Netperf", "netperf_opts" : " -6", })
+p_opts = "-i %s -L %s" % (nperf_max_runs, h2_vlan10.get_ip(0)) +if nperf_cpupin: + p_opts += " -T%s" % nperf_cpupin + netperf_cli_tcp = ctl.get_module("Netperf", options={ "role" : "client", @@ -82,8 +87,7 @@ netperf_cli_tcp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, - "netperf_opts" : "-i %s -L %s" % - (nperf_max_runs, h2_vlan10.get_ip(0)) + "netperf_opts" : p_opts })
netperf_cli_udp = ctl.get_module("Netperf", @@ -93,8 +97,7 @@ netperf_cli_udp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, - "netperf_opts" : "-i %s -L %s" % - (nperf_max_runs, h2_vlan10.get_ip(0)) + "netperf_opts" : p_opts })
netperf_cli_tcp6 = ctl.get_module("Netperf", diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py index e5d4927..249e925 100644 --- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py +++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py @@ -36,6 +36,7 @@ netperf_duration = int(ctl.get_alias("netperf_duration")) nperf_reserve = int(ctl.get_alias("nperf_reserve")) nperf_confidence = ctl.get_alias("nperf_confidence") nperf_max_runs = int(ctl.get_alias("nperf_max_runs")) +nperf_cpupin = ctl.get_alias("nperf_cpupin")
mtu = ctl.get_alias("mtu") enable_udp_perf = ctl.get_alias("enable_udp_perf") @@ -74,6 +75,10 @@ netperf_srv6 = ctl.get_module("Netperf", "netperf_opts" : " -6", })
+p_opts = "-i %s -L %s" % (nperf_max_runs, h2_vlan10.get_ip(0)) +if nperf_cpupin: + p_opts += " -T%s" % nperf_cpupin + netperf_cli_tcp = ctl.get_module("Netperf", options={ "role" : "client", @@ -81,8 +86,7 @@ netperf_cli_tcp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, - "netperf_opts" : "-i %s -L %s" % - (nperf_max_runs, h2_vlan10.get_ip(0)) + "netperf_opts" : p_opts })
netperf_cli_udp = ctl.get_module("Netperf", @@ -92,8 +96,7 @@ netperf_cli_udp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, - "netperf_opts" : "-i %s -L %s" % - (nperf_max_runs, h2_vlan10.get_ip(0)) + "netperf_opts" : p_opts })
netperf_cli_tcp6 = ctl.get_module("Netperf", diff --git a/recipes/regression_tests/phase2/3_vlans_over_team.py b/recipes/regression_tests/phase2/3_vlans_over_team.py index 28914cc..3f9d589 100644 --- a/recipes/regression_tests/phase2/3_vlans_over_team.py +++ b/recipes/regression_tests/phase2/3_vlans_over_team.py @@ -36,6 +36,7 @@ netperf_duration = int(ctl.get_alias("netperf_duration")) nperf_reserve = int(ctl.get_alias("nperf_reserve")) nperf_confidence = ctl.get_alias("nperf_confidence") nperf_max_runs = int(ctl.get_alias("nperf_max_runs")) +nperf_cpupin = ctl.get_alias("nperf_cpupin")
m1_team = m1.get_interface("test_if") m1_team.set_mtu(mtu) @@ -116,11 +117,15 @@ for vlan1 in vlans:
netperf_srv6.update_options({"bind": m1_vlan1.get_ip(1)})
+ p_opts = "-i %s -L %s" % (nperf_max_runs, m2_vlan2.get_ip(0)) + if nperf_cpupin: + p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin) + netperf_cli_tcp.update_options({"netperf_server": m1_vlan1.get_ip(0), - "netperf_opts": "-i %s -L %s" % (nperf_max_runs, m2_vlan2.get_ip(0))}) + "netperf_opts": p_opts})
netperf_cli_udp.update_options({"netperf_server": m1_vlan1.get_ip(0), - "netperf_opts": "-i %s -L %s" % (nperf_max_runs, m2_vlan2.get_ip(0))}) + "netperf_opts": p_opts})
netperf_cli_tcp6.update_options({"netperf_server": m1_vlan1.get_ip(1), "netperf_opts": "-i %s -L %s -6" % (nperf_max_runs, m2_vlan2.get_ip(1))}) diff --git a/recipes/regression_tests/phase2/team_test.py b/recipes/regression_tests/phase2/team_test.py index 9ee0ae0..e8e289b 100644 --- a/recipes/regression_tests/phase2/team_test.py +++ b/recipes/regression_tests/phase2/team_test.py @@ -35,6 +35,7 @@ netperf_duration = int(ctl.get_alias("netperf_duration")) nperf_reserve = int(ctl.get_alias("nperf_reserve")) nperf_confidence = ctl.get_alias("nperf_confidence") nperf_max_runs = int(ctl.get_alias("nperf_max_runs")) +nperf_cpupin = ctl.get_alias("nperf_cpupin")
test_if1 = m1.get_interface("test_if") test_if1.set_mtu(mtu) @@ -71,6 +72,10 @@ netperf_srv6 = ctl.get_module("Netperf", "netperf_opts" : " -6" })
+p_opts = "-i %s -L %s" % (nperf_max_runs, test_if2.get_ip(0)) +if nperf_cpupin: + p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin) + netperf_cli_tcp = ctl.get_module("Netperf", options = { "role" : "client", @@ -78,7 +83,7 @@ netperf_cli_tcp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, - "netperf_opts" : "-i %s -L %s" % (nperf_max_runs, test_if2.get_ip(0)) + "netperf_opts" : p_opts })
netperf_cli_udp = ctl.get_module("Netperf", @@ -88,7 +93,7 @@ netperf_cli_udp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, - "netperf_opts" : "-i %s -L %s" % (nperf_max_runs, test_if2.get_ip(0)) + "netperf_opts" : p_opts })
netperf_cli_tcp6 = ctl.get_module("Netperf", @@ -239,11 +244,15 @@ netperf_srv.update_options({"bind" : test_if2.get_ip(0)})
netperf_srv6.update_options({"bind" : test_if2.get_ip(1)})
+p_opts = "-i %s -L %s" % (nperf_max_runs, test_if1.get_ip(0)) +if nperf_cpupin: + p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin) + netperf_cli_tcp.update_options({"netperf_server" : test_if2.get_ip(0), - "netperf_opts" : "-i %s -L %s" % (nperf_max_runs, test_if1.get_ip(0))}) + "netperf_opts" : p_opts})
netperf_cli_udp.update_options({"netperf_server" : test_if2.get_ip(0), - "netperf_opts" : "-i %s -L %s" % (nperf_max_runs, test_if1.get_ip(0))}) + "netperf_opts" : p_opts})
netperf_cli_tcp6.update_options({"netperf_server" : test_if2.get_ip(1), "netperf_opts" : "-i %s -L %s -6" % (nperf_max_runs, test_if1.get_ip(1))}) diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py index 9ab7398..a2298f7 100644 --- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py @@ -36,6 +36,7 @@ netperf_duration = int(ctl.get_alias("netperf_duration")) nperf_reserve = int(ctl.get_alias("nperf_reserve")) nperf_confidence = ctl.get_alias("nperf_confidence") nperf_max_runs = int(ctl.get_alias("nperf_max_runs")) +nperf_cpupin = ctl.get_alias("nperf_cpupin")
h2_vlan10 = h2.get_interface("vlan10") g1_vlan10 = g1.get_interface("vlan10") @@ -72,6 +73,10 @@ netperf_srv6 = ctl.get_module("Netperf", "netperf_opts" : " -6", })
+p_opts = "-i %s -L %s" % (nperf_max_runs, h2_vlan10.get_ip(0)) +if nperf_cpupin: + p_opts += " -T%s" % nperf_cpupin + netperf_cli_tcp = ctl.get_module("Netperf", options={ "role" : "client", @@ -79,8 +84,7 @@ netperf_cli_tcp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, - "netperf_opts" : "-i %s -L %s" % - (nperf_max_runs, h2_vlan10.get_ip(0)) + "netperf_opts" : p_opts })
netperf_cli_udp = ctl.get_module("Netperf", @@ -90,9 +94,8 @@ netperf_cli_udp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, - "netperf_opts" : "-i %s -L %s" % - (nperf_max_runs, h2_vlan10.get_ip(0)) - }) + "netperf_opts" : p_opts + })
netperf_cli_tcp6 = ctl.get_module("Netperf", options={ diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py index 024369e..105b84a 100644 --- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py +++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py @@ -36,6 +36,7 @@ netperf_duration = int(ctl.get_alias("netperf_duration")) nperf_reserve = int(ctl.get_alias("nperf_reserve")) nperf_confidence = ctl.get_alias("nperf_confidence") nperf_max_runs = int(ctl.get_alias("nperf_max_runs")) +nperf_cpupin = ctl.get_alias("nperf_cpupin")
h2_vlan10 = h2.get_interface("vlan10") g1_guestnic = g1.get_interface("guestnic") @@ -71,6 +72,10 @@ netperf_srv6 = ctl.get_module("Netperf", "netperf_opts" : " -6", })
+p_opts = "-i %s -L %s" % (nperf_max_runs, h2_vlan10.get_ip(0)) +if nperf_cpupin: + p_opts += " -T%s" % nperf_cpupin + netperf_cli_tcp = ctl.get_module("Netperf", options={ "role" : "client", @@ -78,8 +83,7 @@ netperf_cli_tcp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "TCP_STREAM", "confidence" : nperf_confidence, - "netperf_opts" : "-i %s -L %s" % - (nperf_max_runs, h2_vlan10.get_ip(0)) + "netperf_opts" : p_opts })
netperf_cli_udp = ctl.get_module("Netperf", @@ -89,8 +93,7 @@ netperf_cli_udp = ctl.get_module("Netperf", "duration" : netperf_duration, "testname" : "UDP_STREAM", "confidence" : nperf_confidence, - "netperf_opts" : "-i %s -L %s" % - (nperf_max_runs, h2_vlan10.get_ip(0)) + "netperf_opts" : p_opts })
netperf_cli_tcp6 = ctl.get_module("Netperf",
On Thu, Oct 29, 2015 at 10:59:53AM +0100, Jan Tluka wrote:
This patch adds new alias to specify the processor id to use for netperf/netserver. If the alias is not specified the behavior does not change. To use it run:
lnst-ctl -A nperf_cpupin=5 run recipes/regression_tests/phase1/3_vlans.xml
Signed-off-by: Jan Tluka jtluka@redhat.com
Acked-by: Ondrej Lichtner olichtne@redhat.com
lnst-developers@lists.fedorahosted.org