aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/shared/interfaces.robot
diff options
context:
space:
mode:
authorJuraj Linkeš <juraj.linkes@pantheon.tech>2021-10-12 10:03:04 +0200
committerJuraj Linke? <juraj.linkes@pantheon.tech>2021-11-08 10:38:43 +0000
commit3cba9eaf8dce261928939aa112fae4354b51e229 (patch)
tree03f1748116e22cc172f3a523d18f4b180fef4e54 /resources/libraries/robot/shared/interfaces.robot
parent03e0de0418452c9904dafe74d86e36cf3c2a7289 (diff)
vpp_device: bind to vfio-pci before running tests
In rare cases, binding the whole /dev/vfio folder will result in unusable VFs: notice dpdk EAL: Cannot open /dev/vfio/151: Device or resource busy [0], section 4.3.1. provides some clues as to what's going on and how to avoid the failure. Mounting /dev/vfio reset the file descriptors of all devices under /dev/vfio. Vfio-pci creates a device when an interface is bound to it. The rare failure then occurs when /dev/vfio is mounted while a process is using the file descriptors result in that process using invalid file descriptors (or file descriptors belonging to a different VF). Fix the issue by binding i40e and ice VFs to vfio-pci before containers are created and make sure that the VFs are not unbound later in testing. Only bind DUT VFs since the TG uses the kernel driver. [0]: https://connect.redhat.com/sites/default/files/2021-03/Cloud Native Network Function Requirements.pdf Ticket: CSIT-1794 Change-Id: I83db91b29d16669fb034b141ad247f6f796fdf64 Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Diffstat (limited to 'resources/libraries/robot/shared/interfaces.robot')
-rw-r--r--resources/libraries/robot/shared/interfaces.robot3
1 files changed, 2 insertions, 1 deletions
diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot
index 0c669247d6..b33baaf214 100644
--- a/resources/libraries/robot/shared/interfaces.robot
+++ b/resources/libraries/robot/shared/interfaces.robot
@@ -137,7 +137,8 @@
| | Run Keyword If | ${index} >= 0 | Return From Keyword
| | FOR | ${dut} | IN | @{duts}
| | | Stop VPP Service | ${nodes['${dut}']}
-| | | PCI Driver Unbind List | ${nodes['${dut}']} | @{${dut}_pf_pci}
+| | | Unbind PCI Devices From Other Driver | ${nodes['${dut}']} | vfio-pci |
+| | | ... | @{${dut}_pf_pci}
| | | Run keyword | ${dut}.Add DPDK Dev | @{${dut}_pf_pci}
| | | Run Keyword If | ${dpdk_no_tx_checksum_offload}
| | | ... | ${dut}.Add DPDK No Tx Checksum Offload