[v2] dts: automate VFIO-PCI modprobe
Checks
Commit Message
Currently, users must modprobe vfio-pci before running DTS when using a
non-mellanox NIC. This patch automates the process on test run start up.
Signed-off-by: Andrew Bailey <abailey@iol.unh.edu>
---
dts/framework/test_run.py | 8 ++++++++
1 file changed, 8 insertions(+)
@@ -106,6 +106,7 @@
from types import MethodType
from typing import ClassVar, Protocol, Union
+from api.capabilities import LinkTopology
from framework.config.test_run import TestRunConfiguration
from framework.context import Context, init_ctx
from framework.exception import InternalError, SkippedTestException, TestCaseVerifyError
@@ -347,6 +348,13 @@ def next(self) -> State | None:
test_run.ctx.dpdk.setup()
test_run.ctx.topology.setup()
+ if (
+ test_run.ctx.topology.type != LinkTopology.NO_LINK
+ and test_run.ctx.sut_node.ports[0].config.os_driver_for_dpdk == "vfio-pci"
+ ):
+ test_run.ctx.sut_node.main_session.send_command("modprobe vfio")
+ test_run.ctx.sut_node.main_session.send_command("modprobe vfio-pci")
+
if test_run.config.use_virtual_functions:
test_run.ctx.topology.instantiate_vf_ports()