aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/helpers/dpdkbindnic_helper.py
diff options
context:
space:
mode:
authortreyad <treyad@viosoft.com>2018-11-20 01:40:07 -0800
committertreyad <treyad@viosoft.com>2019-03-29 09:24:16 -0700
commit4459d4475e5d9d0c60145072741513f0ea39c39c (patch)
tree217975319c7489b7d0afbfd5fb6488091d3f7393 /yardstick/network_services/helpers/dpdkbindnic_helper.py
parent3ca72d0d45f89732a0d64681a5e7a3ce100de815 (diff)
Support bind driver for QAT HW cards
Load QAT driver Initialize QAT VFs JIRA: YARDSTICK-1504 Change-Id: I1f3768d5436bfaccac5f6226ba19131c4662a08d Signed-off-by: treyad <treyad@viosoft.com>
Diffstat (limited to 'yardstick/network_services/helpers/dpdkbindnic_helper.py')
-rw-r--r--yardstick/network_services/helpers/dpdkbindnic_helper.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/yardstick/network_services/helpers/dpdkbindnic_helper.py b/yardstick/network_services/helpers/dpdkbindnic_helper.py
index 0fc63f88d..33a5e8c1d 100644
--- a/yardstick/network_services/helpers/dpdkbindnic_helper.py
+++ b/yardstick/network_services/helpers/dpdkbindnic_helper.py
@@ -13,7 +13,6 @@
# limitations under the License.
import logging
import os
-
import re
from collections import defaultdict
from itertools import chain
@@ -21,7 +20,6 @@ from itertools import chain
from yardstick.common import exceptions
from yardstick.common.utils import validate_non_string_sequence
-
NETWORK_KERNEL = 'network_kernel'
NETWORK_DPDK = 'network_dpdk'
NETWORK_OTHER = 'network_other'
@@ -288,12 +286,18 @@ printf "%s/driver:" $1 ; basename $(readlink -s $1/device/driver); } \
raise DpdkBindHelperException(template.format(self.dpdk_devbind, res[0]))
return res
- def load_dpdk_driver(self):
+ def load_dpdk_driver(self, dpdk_driver=None):
+ if dpdk_driver is None:
+ dpdk_driver = self.dpdk_driver
cmd_template = "sudo modprobe {} && sudo modprobe {}"
- self.ssh_helper.execute(cmd_template.format(self.UIO_DRIVER, self.dpdk_driver))
-
- def check_dpdk_driver(self):
- return self.ssh_helper.execute("lsmod | grep -i {}".format(self.dpdk_driver))[0]
+ self.ssh_helper.execute(
+ cmd_template.format(self.UIO_DRIVER, dpdk_driver))
+
+ def check_dpdk_driver(self, dpdk_driver=None):
+ if dpdk_driver is None:
+ dpdk_driver = self.dpdk_driver
+ return \
+ self.ssh_helper.execute("lsmod | grep -i {}".format(dpdk_driver))[0]
@property
def _status_cmd(self):