fix(infra): QAT init 96/39996/1
authorpmikus <peter.mikus@protonmail.ch>
Thu, 23 Nov 2023 09:08:23 +0000 (09:08 +0000)
committerpmikus <peter.mikus@protonmail.ch>
Thu, 23 Nov 2023 09:08:23 +0000 (09:08 +0000)
Signed-off-by: pmikus <peter.mikus@protonmail.ch>
Change-Id: I862f9ca12e9149eab2d0701368cdc65f294629cc

resources/libraries/python/QATUtil.py

index 2afea8e..e16221f 100644 (file)
@@ -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"
+                )