Skip to content

fix(network): exclude InfiniBand NICs from skip_if_pci_only_nics guard#4587

Merged
LiliDeng merged 1 commit into
mainfrom
smyakam/skip_if_pci_only_nics/2026_06_09
Jul 10, 2026
Merged

fix(network): exclude InfiniBand NICs from skip_if_pci_only_nics guard#4587
LiliDeng merged 1 commit into
mainfrom
smyakam/skip_if_pci_only_nics/2026_06_09

Conversation

@SRIKKANTH

@SRIKKANTH SRIKKANTH commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

skip_if_pci_only_nics() now ignores InfiniBand interfaces when deciding whether to skip SRIOV disable/enable tests. Only genuine PCI-only Ethernet data NICs (Accelerated Networking without synthetic pairing) trigger the skip.

On ND/GPU SKUs that carry both a synthetic+VF Ethernet pair and InfiniBand NICs, verify_sriov_disable_enable_pci was being incorrectly skipped:

SkippedException: SRIOV disable/enable test not applicable for PCI-only NIC ib0 on node ...

The is_pci_only_nic property returns True for any NIC with a PCI slot, no lower device, and a non-hv_netvsc module — which is exactly how IB NICs (ib0ib3, mlx5) present. So the presence of unrelated IB interfaces caused the guard to skip VMs that actually had a fully testable SRIOV pair (e.g. eth0 synthetic + eth1 VF, same MAC).

Skip NICs where nic.is_infiniband before the is_pci_only_nic check, consistent with the existing exclude_ib convention already used by get_pci_nics(exclude_ib=True) and get_device_slots(exclude_ib=True).

  • IB-equipped Ethernet-SRIOV VMs now correctly run verify_sriov_disable_enable_pci instead of being skipped.
  • Pure PCI-only Ethernet configurations (no synthetic pairing) still skip as intended.
  • No change to non-IB SKUs.

Description

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Checklist

  • Description is filled in above
  • No credentials, secrets, or internal details are included
  • Peer review requested (if not, add required peer reviewers after raising PR)
  • Tests executed and results posted below

Test Validation

Key Test Cases:

Impacted LISA Features:
Sriov, Infiniband, NetworkInterface

Tested Azure Marketplace Images:

  • canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Test Results

Image VM Size Result
canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest Standard_ND128isr_GB300_v6 PASSED
canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest Standard_D2s_v4 PASSED
`skip_if_pci_only_nics()` now ignores InfiniBand interfaces when deciding
whether to skip SRIOV disable/enable tests. Only genuine PCI-only **Ethernet**
data NICs (Accelerated Networking without synthetic pairing) trigger the skip.

On ND/GPU SKUs that carry both a synthetic+VF Ethernet pair and InfiniBand
NICs, `verify_sriov_disable_enable_pci` was being incorrectly skipped:

> SkippedException: SRIOV disable/enable test not applicable for PCI-only NIC ib0 on node ...

The `is_pci_only_nic` property returns `True` for any NIC with a PCI slot, no
`lower` device, and a non-`hv_netvsc` module — which is exactly how IB NICs
(`ib0`–`ib3`, mlx5) present. So the presence of unrelated IB interfaces caused
the guard to skip VMs that actually had a fully testable SRIOV pair
(e.g. `eth0` synthetic + `eth1` VF, same MAC).

Skip NICs where `nic.is_infiniband` before the `is_pci_only_nic` check,
consistent with the existing `exclude_ib` convention already used by
`get_pci_nics(exclude_ib=True)` and `get_device_slots(exclude_ib=True)`.

- IB-equipped Ethernet-SRIOV VMs now correctly run `verify_sriov_disable_enable_pci`
  instead of being skipped.
- Pure PCI-only Ethernet configurations (no synthetic pairing) still skip as intended.
- No change to non-IB SKUs.
@SRIKKANTH SRIKKANTH requested a review from LiliDeng as a code owner July 9, 2026 07:03
Copilot AI review requested due to automatic review settings July 9, 2026 07:03
@SRIKKANTH SRIKKANTH requested a review from umfranci July 9, 2026 07:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an incorrect skip condition in the SR-IOV disable/enable network tests by ensuring InfiniBand interfaces don’t trigger the “PCI-only NIC” guard, allowing IB-equipped SKUs with valid synthetic+VF Ethernet pairs to run the intended test paths.

Changes:

  • Exclude nic.is_infiniband interfaces from the skip_if_pci_only_nics() PCI-only NIC detection loop.
  • Add clarifying docstring/comment explaining why InfiniBand NICs are out of scope for the Ethernet SR-IOV disable/enable scenarios.
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

✅ AI Test Selection — PASSED

51 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest

Count
✅ Passed 46
❌ Failed 0
⏭️ Skipped 5
Total 51
Test case details
Test Case Status Time (s) Message
verify_bbr3_kernel_config_runtime_consistency (lisa_0_4) ⏭️ SKIPPED 9.360 skipped: CONFIG_TCP_CONG_BBR3 is not enabled in kernel.
verify_bbr3_available (lisa_0_1) ⏭️ SKIPPED 9.738 skipped: bbr3 is not available in net.ipv4.tcp_available_congestion_control. CONFIG_TCP_CONG_BBR3 is not enabled in kern
verify_bbr3_set_and_restore (lisa_0_2) ⏭️ SKIPPED 10.874 skipped: bbr3 is not available in net.ipv4.tcp_available_congestion_control. CONFIG_TCP_CONG_BBR3 is not enabled in kern
verify_bbr3_applies_to_live_tcp_flow (lisa_0_3) ⏭️ SKIPPED 12.182 skipped: bbr3 is not available in net.ipv4.tcp_available_congestion_control. CONFIG_TCP_CONG_BBR3 is not enabled in kern
verify_ringbuffer_settings_change (lisa_0_35) ✅ PASSED 15.929
verify_device_channels_change (lisa_0_36) ✅ PASSED 12.892
verify_device_enabled_features (lisa_0_37) ✅ PASSED 12.633
verify_device_gro_lro_settings_change (lisa_0_38) ✅ PASSED 12.265
verify_device_rss_hash_key_change (lisa_0_39) ✅ PASSED 7.834
verify_device_rx_hash_level_change (lisa_0_40) ✅ PASSED 8.454
verify_device_msg_level_change (lisa_0_41) ✅ PASSED 10.145
verify_device_statistics (lisa_0_42) ✅ PASSED 322.143
verify_lwtunnel_bpf_support (lisa_0_0) ⏭️ SKIPPED 8.371 before_case skipped: Unsupported system: 'Ubuntu 22.04.5 LTS'. LWTUNNEL BPF support is only tested on AzureLinux 3.0 and
verify_services_state (lisa_0_13) ✅ PASSED 4.660
verify_sriov_disable_enable (lisa_0_19) ✅ PASSED 72.439
verify_sriov_provision_with_max_nics (lisa_0_23) ✅ PASSED 18.901
verify_sriov_provision_with_max_nics_reboot (lisa_0_24) ✅ PASSED 55.712
verify_sriov_provision_with_max_nics_reboot_from_platform (lisa_0_25) ✅ PASSED 168.617
verify_sriov_provision_with_max_nics_stop_start_from_platform (lisa_0_26) ✅ PASSED 142.046
verify_sriov_basic (lisa_0_14) ✅ PASSED 44.705
verify_sriov_single_vf_connection (lisa_0_15) ✅ PASSED 37.481
verify_sriov_disable_enable_pci (lisa_0_20) ✅ PASSED 45.027
verify_sriov_disable_enable_on_guest (lisa_0_21) ✅ PASSED 35.435
verify_sriov_max_vf_connection (lisa_0_17) ✅ PASSED 59.660
verify_sriov_reload_modules (lisa_0_27) ✅ PASSED 91.107
verify_sriov_add_max_nics (lisa_0_22) ✅ PASSED 246.358
verify_sriov_ethtool_offload_setting (lisa_0_28) ✅ PASSED 382.604
verify_irqbalance (lisa_0_29) ✅ PASSED 324.008
verify_sriov_interrupts_change (lisa_0_30) ✅ PASSED 233.057
verify_sriov_single_vf_connection_max_cpu (lisa_0_16) ✅ PASSED 51.865
verify_sriov_max_vf_connection_max_cpu (lisa_0_18) ✅ PASSED 114.422
verify_inet_diag_destroy (lisa_0_31) ✅ PASSED 5.171
verify_inet_diag_enabled (lisa_0_32) ✅ PASSED 2.441
verify_xfrm_interface (lisa_0_43) ✅ PASSED 11.493
verify_xfrm_interface_load_unload (lisa_0_44) ✅ PASSED 6.338
stress_synthetic_provision_with_max_nics_reboot (lisa_0_7) ✅ PASSED 584.420
stress_sriov_with_max_nics_reboot (lisa_0_10) ✅ PASSED 608.333
stress_synthetic_with_max_nics_reboot_from_platform (lisa_0_8) ✅ PASSED 747.377
stress_sriov_with_max_nics_reboot_from_platform (lisa_0_11) ✅ PASSED 821.132
stress_synthetic_with_max_nics_stop_start_from_platform (lisa_0_9) ✅ PASSED 1298.390
stress_sriov_disable_enable (lisa_0_6) ✅ PASSED 771.923
stress_sriov_with_max_nics_stop_start_from_platform (lisa_0_12) ✅ PASSED 1338.263
stress_sriov_iperf (lisa_0_5) ✅ PASSED 1927.006
validate_netvsc_reload (lisa_0_33) ✅ PASSED 22.521
verify_network_interface_reload_via_ip_link (lisa_0_34) ✅ PASSED 39.425
verify_synthetic_provision_with_max_nics (lisa_0_45) ✅ PASSED 13.660
verify_synthetic_provision_with_max_nics_reboot (lisa_0_46) ✅ PASSED 53.931
verify_synthetic_provision_with_max_nics_reboot_from_platform (lisa_0_47) ✅ PASSED 68.138
verify_synthetic_provision_with_max_nics_stop_start_from_platform (lisa_0_48) ✅ PASSED 134.211
verify_synthetic_add_max_nics_one_time_after_provision (lisa_0_49) ✅ PASSED 387.601
verify_synthetic_add_max_nics_one_by_one_after_provision (lisa_0_50) ✅ PASSED 1132.019
@LiliDeng LiliDeng merged commit 9adcad1 into main Jul 10, 2026
62 checks passed
@LiliDeng LiliDeng deleted the smyakam/skip_if_pci_only_nics/2026_06_09 branch July 10, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants