aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-02-05 11:08:28 +0000
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-02-05 11:52:12 +0000
commita3364a6b9e86308007895b69571028386969a17c (patch)
tree8bb8a270977cb2c8d41b90a74cbc60ab35875673 /yardstick/benchmark
parent35ca724899b3e0a8c58af6323dc4622736ee0625 (diff)
Remove references to "dpdk_nic_bind" utility
In DPDK 16.07 [1], "dpdk_nic_bind" utility was renamed to "dpdk-devbind". This patch removes all references to this previous naming to avoid confusions. [1] https://dpdk-guide.gitlab.io/dpdk-guide/setup/binding.html JIRA: YARDSTICK-995 Change-Id: I827c4c11c9e9e519f33f21b80459e7d65e51545e Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'yardstick/benchmark')
-rw-r--r--yardstick/benchmark/contexts/standalone/model.py6
-rw-r--r--yardstick/benchmark/contexts/standalone/ovs_dpdk.py23
-rw-r--r--yardstick/benchmark/contexts/standalone/sriov.py13
3 files changed, 20 insertions, 22 deletions
diff --git a/yardstick/benchmark/contexts/standalone/model.py b/yardstick/benchmark/contexts/standalone/model.py
index 30170832a..14738da8a 100644
--- a/yardstick/benchmark/contexts/standalone/model.py
+++ b/yardstick/benchmark/contexts/standalone/model.py
@@ -310,7 +310,7 @@ class StandaloneContextHelper(object):
return driver
@classmethod
- def get_nic_details(cls, connection, networks, dpdk_nic_bind):
+ def get_nic_details(cls, connection, networks, dpdk_devbind):
for key, ports in networks.items():
if key == "mgmt":
continue
@@ -320,11 +320,11 @@ class StandaloneContextHelper(object):
driver = cls.get_kernel_module(connection, phy_ports, phy_driver)
# Make sure that ports are bound to kernel drivers e.g. i40e/ixgbe
- bind_cmd = "{dpdk_nic_bind} --force -b {driver} {port}"
+ bind_cmd = "{dpdk_devbind} --force -b {driver} {port}"
lshw_cmd = "lshw -c network -businfo | grep '{port}'"
link_show_cmd = "ip -s link show {interface}"
- cmd = bind_cmd.format(dpdk_nic_bind=dpdk_nic_bind,
+ cmd = bind_cmd.format(dpdk_devbind=dpdk_devbind,
driver=driver, port=ports['phy_port'])
connection.execute(cmd)
diff --git a/yardstick/benchmark/contexts/standalone/ovs_dpdk.py b/yardstick/benchmark/contexts/standalone/ovs_dpdk.py
index 3755b84e9..c931d85d0 100644
--- a/yardstick/benchmark/contexts/standalone/ovs_dpdk.py
+++ b/yardstick/benchmark/contexts/standalone/ovs_dpdk.py
@@ -57,7 +57,7 @@ class OvsDpdkContext(Context):
self.file_path = None
self.sriov = []
self.first_run = True
- self.dpdk_nic_bind = ""
+ self.dpdk_devbind = ''
self.vm_names = []
self.name = None
self.nfvi_host = []
@@ -116,12 +116,12 @@ class OvsDpdkContext(Context):
]
for cmd in cmd_list:
self.connection.execute(cmd)
- bind_cmd = "{dpdk_nic_bind} --force -b {driver} {port}"
+ bind_cmd = "{dpdk_devbind} --force -b {driver} {port}"
phy_driver = "vfio-pci"
- for _, port in self.networks.items():
+ for port in self.networks.values():
vpci = port.get("phy_port")
- self.connection.execute(bind_cmd.format(dpdk_nic_bind=self.dpdk_nic_bind,
- driver=phy_driver, port=vpci))
+ self.connection.execute(bind_cmd.format(
+ dpdk_devbind=self.dpdk_devbind, driver=phy_driver, port=vpci))
def start_ovs_serverswitch(self):
vpath = self.ovs_properties.get("vpath")
@@ -241,7 +241,7 @@ class OvsDpdkContext(Context):
return
self.connection = ssh.SSH.from_node(self.host_mgmt)
- self.dpdk_nic_bind = provision_tool(
+ self.dpdk_devbind = provision_tool(
self.connection,
os.path.join(get_nsb_option("bin_path"), "dpdk-devbind.py"))
@@ -249,9 +249,8 @@ class OvsDpdkContext(Context):
self.check_ovs_dpdk_env()
# Todo: NFVi deploy (sriov, vswitch, ovs etc) based on the config.
StandaloneContextHelper.install_req_libs(self.connection)
- self.networks = StandaloneContextHelper.get_nic_details(self.connection,
- self.networks,
- self.dpdk_nic_bind)
+ self.networks = StandaloneContextHelper.get_nic_details(
+ self.connection, self.networks, self.dpdk_devbind)
self.setup_ovs()
self.start_ovs_serverswitch()
@@ -271,12 +270,12 @@ class OvsDpdkContext(Context):
self.cleanup_ovs_dpdk_env()
# Bind nics back to kernel
- bind_cmd = "{dpdk_nic_bind} --force -b {driver} {port}"
+ bind_cmd = "{dpdk_devbind} --force -b {driver} {port}"
for port in self.networks.values():
vpci = port.get("phy_port")
phy_driver = port.get("driver")
- self.connection.execute(bind_cmd.format(dpdk_nic_bind=self.dpdk_nic_bind,
- driver=phy_driver, port=vpci))
+ self.connection.execute(bind_cmd.format(
+ dpdk_devbind=self.dpdk_devbind, driver=phy_driver, port=vpci))
# Todo: NFVi undeploy (sriov, vswitch, ovs etc) based on the config.
for vm in self.vm_names:
diff --git a/yardstick/benchmark/contexts/standalone/sriov.py b/yardstick/benchmark/contexts/standalone/sriov.py
index 9d8423b5f..9cca3e15c 100644
--- a/yardstick/benchmark/contexts/standalone/sriov.py
+++ b/yardstick/benchmark/contexts/standalone/sriov.py
@@ -41,7 +41,7 @@ class SriovContext(Context):
self.file_path = None
self.sriov = []
self.first_run = True
- self.dpdk_nic_bind = ""
+ self.dpdk_devbind = ''
self.vm_names = []
self.name = None
self.nfvi_host = []
@@ -83,15 +83,14 @@ class SriovContext(Context):
return
self.connection = ssh.SSH.from_node(self.host_mgmt)
- self.dpdk_nic_bind = provision_tool(
+ self.dpdk_devbind = provision_tool(
self.connection,
- os.path.join(get_nsb_option("bin_path"), "dpdk_nic_bind.py"))
+ os.path.join(get_nsb_option("bin_path"), "dpdk-devbind.py"))
# Todo: NFVi deploy (sriov, vswitch, ovs etc) based on the config.
StandaloneContextHelper.install_req_libs(self.connection)
- self.networks = StandaloneContextHelper.get_nic_details(self.connection,
- self.networks,
- self.dpdk_nic_bind)
+ self.networks = StandaloneContextHelper.get_nic_details(
+ self.connection, self.networks, self.dpdk_devbind)
self.nodes = self.setup_sriov_context()
LOG.debug("Waiting for VM to come up...")
@@ -138,7 +137,7 @@ class SriovContext(Context):
except StopIteration:
pass
else:
- raise ValueError("Duplicate nodes!!! Nodes: %s %s",
+ raise ValueError("Duplicate nodes!!! Nodes: %s %s" %
(node, duplicate))
node["name"] = attr_name