Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
start_vm = "no"
expr_driver = "mlx5_vfio_pci"
ping_dest = "www.redhat.com"
test_pf = "ens3f0np0"

only x86_64, aarch64

x86_64:
test_pf = "ens3f0np0"
variants:
- mlx5_vfio:
original_driver = "mlx5_core"
driver_dict = {'driver': {'driver_attr': {'name': 'vfio', 'model': 'mlx5_vfio_pci'}}}
- vfio_vfio:
expr_driver = "vfio-pci"
original_driver = "igbvf"
Comment on lines +15 to +16
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Good fix for vfio_vfio expected driver, but Python code needs update.

Line 15 correctly fixes the issue described in the PR objectives - the vfio_vfio variant now expects the correct "vfio-pci" driver instead of inheriting the "mlx5_vfio_pci" default from line 4.

However, line 16 sets original_driver = "igbvf" but the Python code at line 103 in sriov_attach_detach_device_vfio_variant_driver.py hardcodes exp_driver="mlx5_core" when checking the driver after detachment. This will cause the vfio_vfio variant to fail when verifying driver restoration.

🤖 Prompt for AI Agents
In
libvirt/tests/cfg/sriov/plug_unplug/sriov_attach_detach_device_vfio_variant_driver.cfg
around lines 15–16 and in
libvirt/tests/sriov/sriov_attach_detach_device_vfio_variant_driver.py at line
103, the config sets expr_driver="vfio-pci" and original_driver="igbvf" but the
Python test still hardcodes exp_driver="mlx5_core"; update the test to use the
config's original_driver (or read the device's pre-detach driver) instead of the
hardcoded "mlx5_core" so the post-detach verification checks exp_driver ==
original_driver (or the fetched original driver) and thus matches the variant's
configured original_driver.

driver_dict = {'driver': {'driver_attr': {'name': 'vfio', 'model': 'vfio_pci'}}}
- @default:
driver_dict = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def parse_iface_dict(pf_pci):
dev_type = params.get("dev_type", "hostdev_interface")
device_type = "hostdev" if dev_type == "hostdev_device" else "interface"
expr_driver = params.get("expr_driver", "mlx5_vfio_pci")
original_driver = params.get("original_driver", "mlx5_core")
test_pf = params.get("test_pf")
pf_pci = utils_sriov.get_pf_pci(test_pf=test_pf)
iface_number = int(params.get("iface_number", "1"))
Expand Down