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 <[email protected]> --- dts/framework/test_run.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dts/framework/test_run.py b/dts/framework/test_run.py index ff0a12c9ce..9d7b6271c7 100644 --- a/dts/framework/test_run.py +++ b/dts/framework/test_run.py @@ -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() -- 2.50.1

