On 11/30/21 16:00, David Marchand wrote:
The DPDK unit test only runs if vfio or igb_uio kernel module is loaded:
s/module is loaded/modules are loaded/ ?
on systems with only mlx5, this test is always skipped.
Besides, the test tries to grab the first device listed by dpdk-devbind.py,
regardless of the PCI device status regarding kmod binding.
Remove dependency on this DPDK script and use a minimal script that
reads PCI sysfs.
This script is not perfect, as one can imagine PCI devices bound to
vfio-pci for virtual machines.
Add a new environment variable DPDK_PCI_ADDR for testers to select the
PCI device of their liking.
For consistency and grep, the temporary file PCI_ADDR is renamed
to DPDK_PCI_ADDR.
Note: with mlx5 devices, there is now more OVS/DPDK warnings to waive.
Signed-off-by: David Marchand <[email protected]>
---
Changes since v2:
- sorted logs alphabetically,
---
Documentation/topics/testing.rst | 1 -
tests/automake.mk | 1 +
tests/system-dpdk-find-device.py | 44 ++++++++++++++++++++++++++++++++
tests/system-dpdk-macros.at | 10 ++------
tests/system-dpdk.at | 4 ++-
5 files changed, 50 insertions(+), 10 deletions(-)
create mode 100755 tests/system-dpdk-find-device.py
...
diff --git a/tests/system-dpdk-macros.at b/tests/system-dpdk-macros.at
index 5a6b3cbff9..745740f36b 100644
--- a/tests/system-dpdk-macros.at
+++ b/tests/system-dpdk-macros.at
@@ -22,14 +22,8 @@ m4_define([OVS_DPDK_PRE_PHY_SKIP],
[dnl Perform the precheck
OVS_DPDK_PRE_CHECK()
- dnl Check if VFIO or UIO driver is loaded
- AT_SKIP_IF([ ! (lsmod | grep -E "igb_uio|vfio") ], [], [stdout])
-
- dnl Find PCI address candidate, skip if there is no DPDK-compatible NIC
- AT_CHECK([$DPDK_DIR/usertools/dpdk-devbind.py -s | head -n +4 | tail -1],
[], [stdout])
- AT_CHECK([cat stdout | cut -d" " -s -f1 > PCI_ADDR])
- AT_SKIP_IF([ ! test -s PCI_ADDR ])
-
+ dnl Check if a device is available for DPDK
+ AT_SKIP_IF([ ! $abs_top_srcdir/tests/system-dpdk-find-device.py >
DPDK_PCI_ADDR])
Missing space after DPDK_PCI_ADDR?
Other than that, it looks good to me, feel free to add my:
Reviewed-by: Maxime Coquelin <[email protected]>
Thanks,
Maxime
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev