aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2016-07-26 12:16:17 +0100
committerMartin Klozik <martinx.klozik@intel.com>2016-07-26 12:22:02 +0100
commit49c477226c80bbe7350ddfc77c118d0b8aee0547 (patch)
tree6075b8807a5ad6f81ba4a18c5f22dd56530800f8 /src
parent891488bb5e0047c7062198a9241511c7fcedeb6f (diff)
dpdk: Support of DPDK16.07-rc5 and newer
DPDK 16.07-rc5 has renamed script tools/dpdk_nic_bind.py to tools/dpdk-devbind.py. VSPERF was updated to use wildcard in the script name, which is backward compatible. Function get_version() from tools/systeminfo was updated to correctly parse version information for DPDK v16. Version name includes a minor version as defined inside rte_version.h. It means, that for tag v16.07-rc5 VSPERF will show v16.07.0-rc5 in the report. JIRA: VSPERF-333 Change-Id: I61a4ab2d90304fffdfc4d22a5cbf0cb7295402b3 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: <bmichalo@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/dpdk/dpdk.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/dpdk/dpdk.py b/src/dpdk/dpdk.py
index 30f228f7..477c1de4 100644
--- a/src/dpdk/dpdk.py
+++ b/src/dpdk/dpdk.py
@@ -14,7 +14,7 @@
"""Automation of system configuration for DPDK use.
-Parts of this based on ``tools/dpdk_nic_bind.py`` script from Intel(R)
+Parts of this based on ``tools/dpdk*bind.py`` script from Intel(R)
DPDK.
"""
@@ -23,14 +23,15 @@ from sys import platform as _platform
import os
import subprocess
import logging
+import glob
from tools import tasks
from conf import settings
from tools.module_manager import ModuleManager
_LOGGER = logging.getLogger(__name__)
-RTE_PCI_TOOL = os.path.join(
- settings.getValue('RTE_SDK_USER'), 'tools', 'dpdk_nic_bind.py')
+RTE_PCI_TOOL = glob.glob(os.path.join(
+ settings.getValue('RTE_SDK_USER'), 'tools', 'dpdk*bind.py'))[0]
_DPDK_MODULE_MANAGER = ModuleManager()
@@ -168,7 +169,7 @@ def _vhost_user_cleanup():
def _bind_nics():
- """Bind NICs using the Intel DPDK ``dpdk_nic_bind.py`` tool.
+ """Bind NICs using the Intel DPDK ``dpdk*bind.py`` tool.
"""
try:
_driver = 'igb_uio'
@@ -189,7 +190,7 @@ def _bind_nics():
_LOGGER.error('Unable to bind NICs %s', str(_NICS_PCI))
def _unbind_nics():
- """Unbind NICs using the Intel DPDK ``dpdk_nic_bind.py`` tool.
+ """Unbind NICs using the Intel DPDK ``dpdk*bind.py`` tool.
"""
try:
tasks.run_task(['sudo', RTE_PCI_TOOL, '--unbind'] +
@@ -199,7 +200,7 @@ def _unbind_nics():
except subprocess.CalledProcessError:
_LOGGER.error('Unable to unbind NICs %s', str(_NICS_PCI))
# Rebind NICs to their original drivers
- # using the Intel DPDK ``dpdk_nic_bind.py`` tool.
+ # using the Intel DPDK ``dpdk*bind.py`` tool.
for nic in _NICS:
try:
if nic['driver']: