Sometimes it may be useful to pin only netperf/netserver and let irqbalance
do the IRQ mangling for NIC interrupts.
Beware, that this patch changes the original behaviour. Previously, if
nperf_cpupin alias was set the irqbalance would be turned off and device
IRQs would be pinned to CPU0.
Now, if the alias is set, only netperf process would be pinned to the CPU
set in the alias value.
To disable irqbalance and pin device IRQs, you need to specify netdev_cpupin
alias with the value of CPU to be used for pinning the IRQs.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
recipes/regression_tests/phase1/3_vlans.py | 9 +++++----
recipes/regression_tests/phase1/3_vlans_over_bond.py | 9 +++++----
recipes/regression_tests/phase1/bonding_test.py | 9 +++++----
recipes/regression_tests/phase1/simple_netperf.py | 7 ++++---
.../phase1/virtual_bridge_2_vlans_over_bond.py | 17 ++++++++++-------
.../phase1/virtual_bridge_vlan_in_guest_mirrored.py | 17 ++++++++++-------
.../phase1/virtual_bridge_vlan_in_host_mirrored.py | 17 ++++++++++-------
recipes/regression_tests/phase2/3_vlans_over_team.py | 9 +++++----
recipes/regression_tests/phase2/team_test.py | 9 +++++----
...rtual_ovs_bridge_2_vlans_over_active_backup_bond.py | 18 ++++++++++--------
.../virtual_ovs_bridge_vlan_in_guest_mirrored.py | 17 ++++++++++-------
.../phase2/virtual_ovs_bridge_vlan_in_host_mirrored.py | 17 ++++++++++-------
recipes/regression_tests/phase3/2_virt_ovs_vxlan.py | 9 +++++----
recipes/regression_tests/phase3/ipsec_esp_aead.py | 9 +++++----
recipes/regression_tests/phase3/ipsec_esp_ah_comp.py | 9 +++++----
recipes/regression_tests/phase3/novirt_ovs_vxlan.py | 9 +++++----
.../regression_tests/phase3/short_lived_connections.py | 7 ++++---
recipes/regression_tests/phase3/simple_macsec.py | 9 +++++----
recipes/regression_tests/phase3/vxlan_multicast.py | 9 +++++----
recipes/regression_tests/phase3/vxlan_remote.py | 9 +++++----
20 files changed, 128 insertions(+), 97 deletions(-)
diff --git a/recipes/regression_tests/phase1/3_vlans.py b/recipes/regression_tests/phase1/3_vlans.py
index 2a67c64..4e9d2bb 100644
--- a/recipes/regression_tests/phase1/3_vlans.py
+++ b/recipes/regression_tests/phase1/3_vlans.py
@@ -36,6 +36,7 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
@@ -87,13 +88,13 @@ if adaptive_coalescing_off:
" on device %s" % d.get_devname()})
d.get_host().run(coalesce_status)
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance stop")
m2.run("service irqbalance stop")
- # this will pin devices irqs to cpu #0
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
for m, d in [ (m1, m1_phy1), (m2, m2_phy1) ]:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
ctl.wait(15)
@@ -491,7 +492,7 @@ for offload in offloads:
m1.run("ethtool -K %s %s" % (m1_phy1.get_devname(), dev_features))
m2.run("ethtool -K %s %s" % (m2_phy1.get_devname(), dev_features))
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance start")
m2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py b/recipes/regression_tests/phase1/3_vlans_over_bond.py
index ceef678..17690d1 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 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
@@ -88,13 +89,13 @@ if adaptive_coalescing_off:
" on device %s" % d.get_devname()})
d.get_host().run(coalesce_status)
-if nperf_cpupin:
- # this will pin devices irqs to cpu #0
+if netdev_cpupin:
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
m1.run("service irqbalance stop")
m2.run("service irqbalance stop")
for m, d in [ (m1, m1_phy1), (m1, m1_phy2), (m2, m2_phy1) ]:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
ctl.wait(15)
@@ -492,7 +493,7 @@ m1.run("ethtool -K %s %s" % (m1_phy1.get_devname(), dev_features))
m1.run("ethtool -K %s %s" % (m1_phy2.get_devname(), dev_features))
m2.run("ethtool -K %s %s" % (m2_phy1.get_devname(), dev_features))
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance start")
m2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase1/bonding_test.py b/recipes/regression_tests/phase1/bonding_test.py
index da975a8..bf73619 100644
--- a/recipes/regression_tests/phase1/bonding_test.py
+++ b/recipes/regression_tests/phase1/bonding_test.py
@@ -34,6 +34,7 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
@@ -89,13 +90,13 @@ if adaptive_coalescing_off:
" on device %s" % d.get_devname()})
d.get_host().run(coalesce_status)
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance stop")
m2.run("service irqbalance stop")
- # this will pin devices irqs to cpu #0
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
for m, d in dev_list:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
ping_mod = ctl.get_module("IcmpPing",
options={
@@ -469,7 +470,7 @@ for offload in offloads:
m1.run("ethtool -K %s %s" % (test_if1.get_devname(), dev_features))
m2.run("ethtool -K %s %s" % (test_if2.get_devname(), dev_features))
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance start")
m2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase1/simple_netperf.py b/recipes/regression_tests/phase1/simple_netperf.py
index ceb9171..aaa93e8 100644
--- a/recipes/regression_tests/phase1/simple_netperf.py
+++ b/recipes/regression_tests/phase1/simple_netperf.py
@@ -33,6 +33,7 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
@@ -79,12 +80,12 @@ if adaptive_coalescing_off:
" on device %s" % d.get_devname()})
d.get_host().run(coalesce_status)
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance stop")
m2.run("service irqbalance stop")
for m, d in [ (m1, m1_testiface), (m2, m2_testiface) ]:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
p_opts = "-L %s" % (m2_testiface.get_ip(0))
if nperf_cpupin and nperf_mode != "multi":
@@ -428,7 +429,7 @@ for offload in offloads:
m1.run("ethtool -K %s %s" % (m1_testiface.get_devname(), dev_features))
m2.run("ethtool -K %s %s" % (m2_testiface.get_devname(), dev_features))
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance start")
m2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
index d01d2cc..a872833 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
@@ -39,6 +39,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"))
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
@@ -74,12 +75,13 @@ g2_guestnic = g2.get_interface("guestnic")
g3_guestnic = g3.get_interface("guestnic")
g4_guestnic = g4.get_interface("guestnic")
-h1.run("service irqbalance stop")
-h2.run("service irqbalance stop")
+if netdev_cpupin:
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
+ h1.run("service irqbalance stop")
+ h2.run("service irqbalance stop")
-# this will pin devices irqs to cpu #0
-for m, d in [ (h1, h1_nic1), (h2, h2_nic1) , (h1, h1_nic2), (h2, h2_nic2) ]:
- pin_dev_irqs(m, d, 0)
+ for m, d in [ (h1, h1_nic1), (h2, h2_nic1) , (h1, h1_nic2), (h2, h2_nic2) ]:
+ pin_dev_irqs(m, d, netdev_cpupin)
ping_mod = ctl.get_module("IcmpPing",
options={
@@ -530,5 +532,6 @@ g2.run("ethtool -K %s %s" % (g2_guestnic.get_devname(), dev_features))
g3.run("ethtool -K %s %s" % (g3_guestnic.get_devname(), dev_features))
g4.run("ethtool -K %s %s" % (g4_guestnic.get_devname(), dev_features))
-h1.run("service irqbalance start")
-h2.run("service irqbalance start")
+if netdev_cpupin:
+ h1.run("service irqbalance start")
+ h2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest_mirrored.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest_mirrored.py
index 15285ac..9470d35 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest_mirrored.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest_mirrored.py
@@ -34,6 +34,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"))
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
@@ -68,12 +69,13 @@ g2_guestnic = g2.get_interface("guestnic")
h1_nic = h1.get_interface("nic")
h2_nic = h2.get_interface("nic")
-h1.run("service irqbalance stop")
-h2.run("service irqbalance stop")
+if netdev_cpupin:
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
+ h1.run("service irqbalance stop")
+ h2.run("service irqbalance stop")
-# this will pin devices irqs to cpu #0
-for m, d in [ (h1, h1_nic), (h2, h2_nic) ]:
- pin_dev_irqs(m, d, 0)
+ for m, d in [ (h1, h1_nic), (h2, h2_nic) ]:
+ pin_dev_irqs(m, d, netdev_cpupin)
ping_mod = ctl.get_module("IcmpPing",
options={
@@ -464,5 +466,6 @@ g2.run("ethtool -K %s %s" % (g2_guestnic.get_devname(), dev_features))
h1.run("ethtool -K %s %s" % (h1_nic.get_devname(), dev_features))
h2.run("ethtool -K %s %s" % (h2_nic.get_devname(), dev_features))
-h1.run("service irqbalance start")
-h2.run("service irqbalance start")
+if netdev_cpupin:
+ h1.run("service irqbalance start")
+ h2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host_mirrored.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host_mirrored.py
index 7ed9ccb..4b9a43c 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host_mirrored.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host_mirrored.py
@@ -34,6 +34,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"))
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
@@ -66,12 +67,13 @@ g2_guestnic = g2.get_interface("guestnic")
h1_nic = h1.get_interface("nic")
h2_nic = h2.get_interface("nic")
-h1.run("service irqbalance stop")
-h2.run("service irqbalance stop")
+if netdev_cpupin:
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
+ h1.run("service irqbalance stop")
+ h2.run("service irqbalance stop")
-# this will pin devices irqs to cpu #0
-for m, d in [ (h1, h1_nic), (h2, h2_nic) ]:
- pin_dev_irqs(m, d, 0)
+ for m, d in [ (h1, h1_nic), (h2, h2_nic) ]:
+ pin_dev_irqs(m, d, netdev_cpupin)
ping_mod = ctl.get_module("IcmpPing",
options={
@@ -462,5 +464,6 @@ g2.run("ethtool -K %s %s" % (g2_guestnic.get_devname(), dev_features))
h1.run("ethtool -K %s %s" % (h1_nic.get_devname(), dev_features))
h2.run("ethtool -K %s %s" % (h2_nic.get_devname(), dev_features))
-h1.run("service irqbalance start")
-h2.run("service irqbalance start")
+if netdev_cpupin:
+ h1.run("service irqbalance start")
+ h2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase2/3_vlans_over_team.py b/recipes/regression_tests/phase2/3_vlans_over_team.py
index a7bb794..73fb1ae 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 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
@@ -88,13 +89,13 @@ if adaptive_coalescing_off:
" on device %s" % d.get_devname()})
d.get_host().run(coalesce_status)
-if nperf_cpupin:
- # this will pin devices irqs to cpu #0
+if netdev_cpupin:
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
m1.run("service irqbalance stop")
m2.run("service irqbalance stop")
for m, d in [ (m1, m1_phy1), (m1, m1_phy2), (m2, m2_phy1) ]:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
ctl.wait(15)
@@ -492,7 +493,7 @@ m1.run("ethtool -K %s %s" % (m1_phy1.get_devname(), dev_features))
m1.run("ethtool -K %s %s" % (m1_phy2.get_devname(), dev_features))
m2.run("ethtool -K %s %s" % (m2_phy1.get_devname(), dev_features))
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance start")
m2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase2/team_test.py b/recipes/regression_tests/phase2/team_test.py
index acc0112..0443a4c 100644
--- a/recipes/regression_tests/phase2/team_test.py
+++ b/recipes/regression_tests/phase2/team_test.py
@@ -34,6 +34,7 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
@@ -89,13 +90,13 @@ if adaptive_coalescing_off:
" on device %s" % d.get_devname()})
d.get_host().run(coalesce_status)
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance stop")
m2.run("service irqbalance stop")
- # this will pin devices irqs to cpu #0
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
for m, d in dev_list:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
ping_mod = ctl.get_module("IcmpPing",
options={
@@ -731,7 +732,7 @@ for offload in offloads:
m1.run("ethtool -K %s %s" % (test_if1.get_devname(), dev_features))
m2.run("ethtool -K %s %s" % (test_if2.get_devname(), dev_features))
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance start")
m2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
index 1d9c1c4..8c2c77b 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
@@ -40,6 +40,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"))
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
@@ -73,13 +74,13 @@ g2_guestnic = g2.get_interface("guestnic")
g3_guestnic = g3.get_interface("guestnic")
g4_guestnic = g4.get_interface("guestnic")
-h1.run("service irqbalance stop")
-h2.run("service irqbalance stop")
-
-# this will pin devices irqs to cpu #0
-for m, d in [ (h1, h1_nic1), (h2, h2_nic1) , (h1, h1_nic2), (h2, h2_nic2) ]:
- pin_dev_irqs(m, d, 0)
+if netdev_cpupin:
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
+ h1.run("service irqbalance stop")
+ h2.run("service irqbalance stop")
+ for m, d in [ (h1, h1_nic1), (h2, h2_nic1) , (h1, h1_nic2), (h2, h2_nic2) ]:
+ pin_dev_irqs(m, d, netdev_cpupin)
ping_mod = ctl.get_module("IcmpPing",
options={
@@ -533,5 +534,6 @@ g2.run("ethtool -K %s %s" % (g2_guestnic.get_devname(), dev_features))
g3.run("ethtool -K %s %s" % (g3_guestnic.get_devname(), dev_features))
g4.run("ethtool -K %s %s" % (g4_guestnic.get_devname(), dev_features))
-h1.run("service irqbalance start")
-h2.run("service irqbalance start")
+if netdev_cpupin:
+ h1.run("service irqbalance start")
+ h2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest_mirrored.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest_mirrored.py
index 29a8b6f..aeb390e 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest_mirrored.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest_mirrored.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"))
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
@@ -67,12 +68,13 @@ h2_nic = h2.get_interface("nic")
g1_guestnic = g1.get_interface("guestnic")
g2_guestnic = g2.get_interface("guestnic")
-h1.run("service irqbalance stop")
-h2.run("service irqbalance stop")
+if netdev_cpupin:
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
+ h1.run("service irqbalance stop")
+ h2.run("service irqbalance stop")
-# this will pin devices irqs to cpu #0
-for m, d in [ (h1, h1_nic), (h2, h2_nic) ]:
- pin_dev_irqs(m, d, 0)
+ for m, d in [ (h1, h1_nic), (h2, h2_nic) ]:
+ pin_dev_irqs(m, d, netdev_cpupin)
ping_mod = ctl.get_module("IcmpPing",
options={
@@ -467,5 +469,6 @@ g1.run("ethtool -K %s %s" % (g1_guestnic.get_devname(), dev_features))
h2.run("ethtool -K %s %s" % (h2_nic.get_devname(), dev_features))
g2.run("ethtool -K %s %s" % (g2_guestnic.get_devname(), dev_features))
-h1.run("service irqbalance start")
-h2.run("service irqbalance start")
+if netdev_cpupin:
+ h1.run("service irqbalance start")
+ h2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host_mirrored.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host_mirrored.py
index dd91849..634325c 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host_mirrored.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host_mirrored.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"))
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
@@ -65,12 +66,13 @@ g2_guestnic = g2.get_interface("guestnic")
h1_nic = h1.get_interface("nic")
h2_nic = h2.get_interface("nic")
-h1.run("service irqbalance stop")
-h2.run("service irqbalance stop")
+if netdev_cpupin:
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
+ h1.run("service irqbalance stop")
+ h2.run("service irqbalance stop")
-# this will pin devices irqs to cpu #0
-for m, d in [ (h1, h1_nic), (h2, h2_nic) ]:
- pin_dev_irqs(m, d, 0)
+ for m, d in [ (h1, h1_nic), (h2, h2_nic) ]:
+ pin_dev_irqs(m, d, netdev_cpupin)
ping_mod = ctl.get_module("IcmpPing",
options={
@@ -462,5 +464,6 @@ g1.run("ethtool -K %s %s" % (g1_guestnic.get_devname(), dev_features))
h2.run("ethtool -K %s %s" % (h2_nic.get_devname(), dev_features))
g2.run("ethtool -K %s %s" % (g2_guestnic.get_devname(), dev_features))
-h1.run("service irqbalance start")
-h2.run("service irqbalance start")
+if netdev_cpupin:
+ h1.run("service irqbalance start")
+ h2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase3/2_virt_ovs_vxlan.py b/recipes/regression_tests/phase3/2_virt_ovs_vxlan.py
index ad3bccf..107d1ae 100644
--- a/recipes/regression_tests/phase3/2_virt_ovs_vxlan.py
+++ b/recipes/regression_tests/phase3/2_virt_ovs_vxlan.py
@@ -40,6 +40,7 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
nperf_debug = ctl.get_alias("nperf_debug")
@@ -62,7 +63,7 @@ g2_nic.set_mtu(mtu)
g3_nic.set_mtu(mtu)
g4_nic.set_mtu(mtu)
-if nperf_cpupin:
+if netdev_cpupin:
host1.run("service irqbalance stop")
host2.run("service irqbalance stop")
guest1.run("service irqbalance stop")
@@ -72,9 +73,9 @@ if nperf_cpupin:
h1_if = host1.get_interface("if1")
h2_if = host2.get_interface("if1")
- #this will pin devices irqs to cpu #0
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
for m, d in [(host1, h1_if), (host2, h2_if)]:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
nperf_opts = ""
if nperf_cpupin and nperf_num_parallel == 1:
@@ -279,7 +280,7 @@ if ipv in [ 'ipv6', 'both' ]:
result_udp.set_comment(pr_comment)
perf_api.save_result(result_udp, official_result)
-if nperf_cpupin:
+if netdev_cpupin:
host1.run("service irqbalance start")
host2.run("service irqbalance start")
guest1.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase3/ipsec_esp_aead.py b/recipes/regression_tests/phase3/ipsec_esp_aead.py
index a6cc67c..b4faafa 100644
--- a/recipes/regression_tests/phase3/ipsec_esp_aead.py
+++ b/recipes/regression_tests/phase3/ipsec_esp_aead.py
@@ -47,6 +47,7 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
nperf_debug = ctl.get_alias("nperf_debug")
@@ -106,15 +107,15 @@ if (res.get_result()["res_data"]["stdout"].find("iproute-2") != -1):
else:
m2_key=""
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance stop")
m2.run("service irqbalance stop")
dev_list = [(m1, m1_if), (m2, m2_if)]
- # this will pin devices irqs to cpu #0
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
for m, d in dev_list:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
nperf_opts = ""
if nperf_cpupin and nperf_num_parallel == 1:
@@ -428,6 +429,6 @@ m1.run("ip xfrm state flush")
m2.run("ip xfrm policy flush")
m2.run("ip xfrm state flush")
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance start")
m2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase3/ipsec_esp_ah_comp.py b/recipes/regression_tests/phase3/ipsec_esp_ah_comp.py
index 8b6a944..33043df 100644
--- a/recipes/regression_tests/phase3/ipsec_esp_ah_comp.py
+++ b/recipes/regression_tests/phase3/ipsec_esp_ah_comp.py
@@ -54,6 +54,7 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
nperf_debug = ctl.get_alias("nperf_debug")
@@ -113,15 +114,15 @@ if (res.get_result()["res_data"]["stdout"].find("iproute-2") != -1):
else:
m2_key=""
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance stop")
m2.run("service irqbalance stop")
dev_list = [(m1, m1_if), (m2, m2_if)]
- # this will pin devices irqs to cpu #0
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
for m, d in dev_list:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
nperf_opts = ""
if nperf_cpupin and nperf_num_parallel == 1:
@@ -554,6 +555,6 @@ m1.run("ip xfrm state flush")
m2.run("ip xfrm policy flush")
m2.run("ip xfrm state flush")
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance start")
m2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase3/novirt_ovs_vxlan.py b/recipes/regression_tests/phase3/novirt_ovs_vxlan.py
index 669e9e9..cc3bcd9 100644
--- a/recipes/regression_tests/phase3/novirt_ovs_vxlan.py
+++ b/recipes/regression_tests/phase3/novirt_ovs_vxlan.py
@@ -34,6 +34,7 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
nperf_debug = ctl.get_alias("nperf_debug")
@@ -51,16 +52,16 @@ h2_nic = h2.get_device("int0")
h1_nic.set_mtu(mtu)
h2_nic.set_mtu(mtu)
-if nperf_cpupin:
+if netdev_cpupin:
h1.run("service irqbalance stop")
h2.run("service irqbalance stop")
h1_phy = h1.get_interface("if1")
h2_phy = h2.get_interface("if1")
- # this will pin devices irqs to cpu #0
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
for m, d in [(h1, h1_phy), (h2, h2_phy)]:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
nperf_opts = ""
if nperf_cpupin and nperf_num_parallel == 1:
@@ -223,6 +224,6 @@ if ipv in [ 'ipv6', 'both' ]:
result_udp.set_comment(pr_comment)
perf_api.save_result(result_udp, official_result)
-if nperf_cpupin:
+if netdev_cpupin:
h1.run("service irqbalance start")
h2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase3/short_lived_connections.py b/recipes/regression_tests/phase3/short_lived_connections.py
index 4409f98..6ed38c6 100644
--- a/recipes/regression_tests/phase3/short_lived_connections.py
+++ b/recipes/regression_tests/phase3/short_lived_connections.py
@@ -30,6 +30,7 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
@@ -45,12 +46,12 @@ m2_testiface.set_mtu(mtu)
pr_comment = generate_perfrepo_comment([m1, m2], pr_user_comment)
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance stop")
m2.run("service irqbalance stop")
for m, d in [ (m1, m1_testiface), (m2, m2_testiface) ]:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
p_opts = "-L %s" % (m2_testiface.get_ip(0))
@@ -162,6 +163,6 @@ for size in ["1K,1K", "5K,5K", "7K,7K", "10K,10K", "12K,12K"]:
srv_proc.intr()
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance start")
m2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase3/simple_macsec.py b/recipes/regression_tests/phase3/simple_macsec.py
index 0601c0e..4327e64 100644
--- a/recipes/regression_tests/phase3/simple_macsec.py
+++ b/recipes/regression_tests/phase3/simple_macsec.py
@@ -33,6 +33,7 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
nperf_debug = ctl.get_alias("nperf_debug")
@@ -95,15 +96,15 @@ def macsecSetup(encryption):
m2.run("ip -6 addr add %s/64 dev %s" % (m2_tif_addr6, msec_tif_name))
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance stop")
m2.run("service irqbalance stop")
dev_list = [(m1, m1_phy), (m2, m2_phy)]
- # this will pin devices irqs to cpu #0
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
for m, d in dev_list:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
nperf_opts = ""
if nperf_cpupin and nperf_num_parallel == 1:
@@ -289,6 +290,6 @@ for setting in encryption_settings:
m1.run("ip link delete %s" % msec_tif_name)
m2.run("ip link delete %s" % msec_tif_name)
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance start")
m2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase3/vxlan_multicast.py b/recipes/regression_tests/phase3/vxlan_multicast.py
index f9bff44..6e2c8ce 100644
--- a/recipes/regression_tests/phase3/vxlan_multicast.py
+++ b/recipes/regression_tests/phase3/vxlan_multicast.py
@@ -35,6 +35,7 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
nperf_debug = ctl.get_alias("nperf_debug")
@@ -53,7 +54,7 @@ test_if2.set_mtu(mtu)
test_if3 = g1.get_interface("test_if")
test_if3.set_mtu(mtu)
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance stop")
m2.run("service irqbalance stop")
@@ -61,9 +62,9 @@ if nperf_cpupin:
m2_phy1 = m2.get_interface("eth1")
dev_list = [(m1, m1_phy1), (m2, m2_phy1)]
- # this will pin devices irqs to cpu #0
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
for m, d in dev_list:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
nperf_opts = ""
if nperf_cpupin and nperf_num_parallel == 1:
@@ -250,6 +251,6 @@ if ipv in [ 'ipv6', 'both' ]:
result_udp.set_comment(pr_comment)
perf_api.save_result(result_udp, official_result)
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance start")
m2.run("service irqbalance start")
diff --git a/recipes/regression_tests/phase3/vxlan_remote.py b/recipes/regression_tests/phase3/vxlan_remote.py
index 61d9532..6ac2b8a 100644
--- a/recipes/regression_tests/phase3/vxlan_remote.py
+++ b/recipes/regression_tests/phase3/vxlan_remote.py
@@ -34,6 +34,7 @@ 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")
+netdev_cpupin = ctl.get_alias("netdev_cpupin")
nperf_cpu_util = ctl.get_alias("nperf_cpu_util")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
nperf_debug = ctl.get_alias("nperf_debug")
@@ -50,7 +51,7 @@ test_if1.set_mtu(mtu)
test_if2 = m2.get_interface("test_if")
test_if2.set_mtu(mtu)
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance stop")
m2.run("service irqbalance stop")
@@ -58,9 +59,9 @@ if nperf_cpupin:
m2_phy1 = m2.get_interface("eth")
dev_list = [(m1, m1_phy1), (m2, m2_phy1)]
- # this will pin devices irqs to cpu #0
+ # this will pin devices irqs to cpu specified by netdev_cpupin alias
for m, d in dev_list:
- pin_dev_irqs(m, d, 0)
+ pin_dev_irqs(m, d, netdev_cpupin)
nperf_opts = ""
if nperf_cpupin and nperf_num_parallel == 1:
@@ -219,6 +220,6 @@ if ipv in [ 'ipv6', 'both' ]:
result_udp.set_comment(pr_comment)
perf_api.save_result(result_udp, official_result)
-if nperf_cpupin:
+if netdev_cpupin:
m1.run("service irqbalance start")
m2.run("service irqbalance start")
--
2.14.4