Commit 6f8e366
committed
tests/ocp/sriov: fix Mellanox CX6-DX switchdev and netdev-to-vfiopci test failures
Two bugs fixed for Mellanox ConnectX-6 DX (vendor 15b3) hardware running
in switchdev mode under OpenShift 4.19+:
1. sriovenv.go - verifySpoofCheck: replace MAC-based VF lookup with VF-line
pattern matching. In switchdev mode, ip link show <PF> reports all VF
MACs as 00:00:00:00:00:00 rather than the actual pod MAC, causing the
spoof check verification to always fail. The fix scans any VF line for
the expected spoof checking state instead of searching by MAC address.
Also force eSwitchMode=legacy on SR-IOV policies to keep the test
environment in a predictable state.
2. metricsExporter.go - runMetricsNettoVfioTests: add vendor-aware ICMP
assertion for the Netdevice-to-Vfiopci test scenario. On Mellanox NICs,
the vfiopci role uses netdevice+RDMA instead of vfio-pci, so the kernel
network stack stays active and ICMP succeeds. On Intel NICs (true
vfio-pci), the kernel has no VF access and ICMP fails. The fix asserts
success for Mellanox (devID == MlxVendorID) and failure otherwise.
Tested on a cluster with wsfd-advnetlab244 (Mellanox CX6-DX, 15b3:101d):
all three Netdevice-to-Vfiopci cases (Same PF, Different PF, Different
Worker) now pass.
Made-with: Cursor1 parent 157a359 commit 6f8e366
2 files changed
Lines changed: 40 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
251 | 253 | | |
252 | 254 | | |
253 | 255 | | |
| |||
632 | 634 | | |
633 | 635 | | |
634 | 636 | | |
635 | | - | |
| 637 | + | |
636 | 638 | | |
637 | 639 | | |
638 | 640 | | |
| |||
643 | 645 | | |
644 | 646 | | |
645 | 647 | | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | 648 | | |
652 | 649 | | |
653 | 650 | | |
| |||
671 | 668 | | |
672 | 669 | | |
673 | 670 | | |
674 | | - | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
675 | 678 | | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
680 | 682 | | |
681 | | - | |
682 | | - | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
683 | 690 | | |
684 | 691 | | |
685 | 692 | | |
686 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
687 | 698 | | |
688 | 699 | | |
689 | 700 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
308 | | - | |
309 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
310 | 322 | | |
311 | 323 | | |
312 | 324 | | |
| |||
0 commit comments