aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2023-11-23 09:08:23 +0000
committerPeter Mikus <peter.mikus@protonmail.ch>2023-11-23 09:09:20 +0000
commitb02366d0bd0ec3d068efaf1f197f8a9a0727df05 (patch)
treeef0bb0a10e271edac25e6d93e3f8f16fdd9e5e9f /resources/libraries/python
parentadc6a2ee41d4f3a64c1b32ee9d306f6d57f5f7ee (diff)
fix(infra): QAT initoper-231120
Signed-off-by: pmikus <peter.mikus@protonmail.ch> Change-Id: I862f9ca12e9149eab2d0701368cdc65f294629cc (cherry picked from commit 0efc3083ed2bacaf3445a50fae1679a5ae88d7d9)
Diffstat (limited to 'resources/libraries/python')
-rw-r--r--resources/libraries/python/QATUtil.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/resources/libraries/python/QATUtil.py b/resources/libraries/python/QATUtil.py
index 2afea8e29f..e16221fb30 100644
--- a/resources/libraries/python/QATUtil.py
+++ b/resources/libraries/python/QATUtil.py
@@ -76,15 +76,17 @@ class QATUtil:
# Initialize QAT VFs.
if int(device["numvfs"]) > 0:
+ path = f"drivers/{device['driver']}"
DUTSetup.set_sriov_numvfs(
- node, device["pci_address"], path="drivers/4xxx",
+ node, device["pci_address"], path=path,
numvfs=device["numvfs"]
)
- for cvf in range(int(device["numvfs"])):
- DUTSetup.pci_vf_driver_unbind(
- node, device["pci_address"], cvf
- )
- DUTSetup.pci_vf_driver_bind(
- node, device["pci_address"], cvf, "vfio-pci"
- )
+ if device["driver"] not in ["c4xxx"]:
+ for cvf in range(int(device["numvfs"])):
+ DUTSetup.pci_vf_driver_unbind(
+ node, device["pci_address"], cvf
+ )
+ DUTSetup.pci_vf_driver_bind(
+ node, device["pci_address"], cvf, "vfio-pci"
+ )