oktetlabs / test-environment

OKTET Labs Test Environment
Other
5 stars 9 forks source link

doc/cm: reflect PCI serial number dependency on driver #8

Closed okt-galaktionov closed 1 year ago

okt-galaktionov commented 1 year ago

Prevent Configurator from trying to restore PCI serial numbers of devices that were rebound to a different driver during test execution.

PCI serial numbers are extracted using the devlink interface, which is not available with every driver. For example, when vfio-pci is used, a blank serial number is reported by the Configurator.

By restoring the driver first, the Configurator reverses the change to the serial number instance implicitly, thus avoiding the need to restore it explicitly.

Testing done: Cleanup after DPDK-based vswitch-ts configurations no longer fails trying to perform an invalid set operation

okt-galaktionov commented 1 year ago

I agree that it's not a perfect solution, but it's the simplest one and it's technically not wrong, since the value of a serialno instance really does depend on the driver bound to the corresponding device. I don't need the serial number in my case, so this fix seems appropriate to me. I propose that the lack of serial numbers is fixed when it becomes an issue.