Skip to content

Add dual NIC passthrough validation#4579

Open
vyadavmsft wants to merge 1 commit into
mainfrom
users/vyadav/dual-nic-passthrough
Open

Add dual NIC passthrough validation#4579
vyadavmsft wants to merge 1 commit into
mainfrom
users/vyadav/dual-nic-passthrough

Conversation

@vyadavmsft

Copy link
Copy Markdown
Collaborator

Add a device passthrough functional test that validates two pci_net devices assigned to a single guest. The test reads the runtime passthrough context, resolves the assigned host vendor and device IDs, and verifies the expected NICs are visible inside the guest.

Keep two-guest passthrough performance tests compatible with dual-NIC runbooks by giving those cases an explicit one-PCI-NIC-per-node requirement. This prevents a dual-NIC functional runbook from applying count=2 to every guest in a two-node perf environment.

Preserve platform extended schemas as defaults while allowing case requirements to narrow specific platform fields. That keeps runbook-provided disk and kernel settings intact while letting tests override passthrough counts when their topology needs a different device split.

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:

Tested Azure Marketplace Images:

Test Results

Image VM Size Result
PASSED / FAILED / SKIPPED

Copilot AI review requested due to automatic review settings July 6, 2026 06:04

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 extends the device passthrough test coverage by adding a functional validation for dual PCI NIC passthrough on a single guest, and adjusts requirement/merging behavior so runbook-provided platform defaults remain intact while test cases can narrow specific passthrough requirements (e.g., per-node device counts).

Changes:

  • Adjust platform-vs-case extended schema merging so platform schemas act as defaults and case requirements can narrow/override specific fields.
  • Add a functional test case that validates two pci_net passthrough devices are assigned and visible in-guest (via vendor/device ID checks with lspci).
  • Refactor two-guest passthrough perf cases to use an explicit “one PCI NIC per node” requirement (to avoid dual-NIC functional runbooks impacting two-node perf topology).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
lisa/runners/lisa_runner.py Changes extended schema merge order so platform schemas provide defaults and test requirements can override/narrow specific fields.
lisa/microsoft/testsuites/performance/networkperf_passthrough.py Introduces a shared two-guest passthrough requirement with explicit per-node PCI NIC passthrough config.
lisa/microsoft/testsuites/device_passthrough/functional_tests.py Adds a dual-NIC passthrough functional validation and refactors passthrough-context parsing into reusable helpers.

Comment thread lisa/microsoft/testsuites/performance/networkperf_passthrough.py Outdated
Comment thread lisa/microsoft/testsuites/device_passthrough/functional_tests.py Outdated
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

⚠️ AI Test Selection — cancelled

53 test case(s) selected (view run)

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

Count
✅ Passed 12
❌ Failed 0
⏭️ Skipped 3
Total 15
Test case details
Test Case Status Time (s) Message
perf_nested_hyperv_storage_singledisk (lisa_0_4) ⏭️ SKIPPED 0.000 check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper
perf_nested_kvm_storage_singledisk (lisa_0_2) ✅ PASSED 5475.946
perf_nested_hyperv_storage_multidisk (lisa_0_5) ⏭️ SKIPPED 0.000 check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper
perf_nested_hyperv_ntttcp_different_l1_nat (lisa_0_8) ⏭️ SKIPPED 0.000 check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper
perf_epoll (lisa_0_11) ✅ PASSED 184.135
perf_messaging (lisa_0_10) ✅ PASSED 1992.615
perf_nvme_io_uring (lisa_0_1) ✅ PASSED 5343.001
perf_resource_disk_1024k (lisa_0_43) ✅ PASSED 1626.208
perf_resource_disk_4k (lisa_0_44) ✅ PASSED 4416.958
perf_ultra_datadisks_1024k (lisa_0_36) ✅ PASSED 1053.806
perf_storage_generic_fio_test (lisa_0_52) ✅ PASSED 4483.674
perf_ultra_datadisks_4k (lisa_0_35) ✅ PASSED 4368.976
perf_tcp_latency_sriov (lisa_0_13) ✅ PASSED 179.157
perf_tcp_single_pps_sriov (lisa_0_15) ✅ PASSED 167.819
perf_tcp_max_pps_sriov (lisa_0_17) ✅ PASSED 132.472

LiliDeng
LiliDeng previously approved these changes Jul 6, 2026
@vyadavmsft vyadavmsft force-pushed the users/vyadav/dual-nic-passthrough branch from d0f7c9b to 714f8b0 Compare July 6, 2026 17:15
Copilot AI review requested due to automatic review settings July 6, 2026 18:34
@vyadavmsft vyadavmsft force-pushed the users/vyadav/dual-nic-passthrough branch from 714f8b0 to 6c206a3 Compare July 6, 2026 18:34
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

⚠️ AI Test Selection — cancelled

53 test case(s) selected (view run)

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

Count
✅ Passed 3
❌ Failed 0
⏭️ Skipped 1
Total 4
Test case details
Test Case Status Time (s) Message
perf_nested_hyperv_storage_singledisk (lisa_0_4) ⏭️ SKIPPED 0.000 check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper
perf_epoll (lisa_0_11) ✅ PASSED 194.546
perf_messaging (lisa_0_10) ✅ PASSED 2049.443
perf_resource_disk_1024k (lisa_0_43) ✅ PASSED 1620.726

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread lisa/microsoft/testsuites/device_passthrough/functional_tests.py
Copilot AI review requested due to automatic review settings July 6, 2026 19:01
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

⚠️ AI Test Selection — cancelled

53 test case(s) selected (view run)

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

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 1
Total 2
Test case details
Test Case Status Time (s) Message
perf_nested_hyperv_storage_singledisk (lisa_0_4) ⏭️ SKIPPED 0.000 check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper
perf_epoll (lisa_0_11) ✅ PASSED 196.029

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread lisa/microsoft/testsuites/device_passthrough/functional_tests.py
Comment thread lisa/microsoft/testsuites/performance/networkperf_passthrough.py
Add a device passthrough functional test that validates two pci_net devices assigned to a single guest. The test reads the runtime passthrough context, resolves the assigned host vendor and device IDs, and verifies the expected NICs are visible inside the guest.

Keep Cloud Hypervisor two-guest passthrough performance tests compatible with dual-NIC runbooks by giving those cases an explicit one-PCI-NIC-per-node requirement. The override is scoped to Cloud Hypervisor so inactive platform schema keys are not passed to platform-specific schema loaders.

Preserve platform extended schemas as defaults while allowing case requirements to narrow active fields such as device_passthrough.count. This lets the two-guest performance cases request one passthrough NIC per node while the dual-NIC functional case can still use the runbook default of two devices for one guest.

Initialize the expected device map before populating assigned passthrough device counts so flake8 and runtime validation do not fail with an undefined variable.
@vyadavmsft vyadavmsft force-pushed the users/vyadav/dual-nic-passthrough branch from 9ad3ee1 to 5957360 Compare July 6, 2026 19:10
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

⚠️ AI Test Selection — cancelled

53 test case(s) selected (view run)

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

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 1
Total 2
Test case details
Test Case Status Time (s) Message
perf_nested_hyperv_storage_singledisk (lisa_0_4) ⏭️ SKIPPED 0.000 check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper
perf_epoll (lisa_0_11) ✅ PASSED 195.208

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

⚠️ AI Test Selection — cancelled

53 test case(s) selected (view run)

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

Count
✅ Passed 11
❌ Failed 1
⏭️ Skipped 3
Total 15
Test case details
Test Case Status Time (s) Message
perf_nested_hyperv_storage_singledisk (lisa_0_4) ⏭️ SKIPPED 0.000 check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper
perf_nested_kvm_storage_singledisk (lisa_0_2) ❌ FAILED 904.072 failed. LisaException: command '['sudo', 'sh', '-c', 'openssl passwd -6 #htOSL%7CU2pSY18']' timeout after 600 seconds.
perf_nested_hyperv_storage_multidisk (lisa_0_5) ⏭️ SKIPPED 0.000 check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper
perf_nested_hyperv_ntttcp_different_l1_nat (lisa_0_8) ⏭️ SKIPPED 0.000 check skipped: OS type mismatch: ["requires [<class 'lisa.operating_system.Windows'>] but VM supports [<class 'lisa.oper
perf_resource_disk_1024k (lisa_0_43) ✅ PASSED 1615.397
perf_ultra_datadisks_1024k (lisa_0_36) ✅ PASSED 1275.177
perf_storage_generic_fio_test (lisa_0_52) ✅ PASSED 3538.976
perf_resource_disk_4k (lisa_0_44) ✅ PASSED 4423.275
perf_ultra_datadisks_4k (lisa_0_35) ✅ PASSED 4379.816
perf_nvme_io_uring (lisa_0_1) ✅ PASSED 5346.926
perf_epoll (lisa_0_11) ✅ PASSED 194.933
perf_messaging (lisa_0_10) ✅ PASSED 2082.345
perf_tcp_latency_sriov (lisa_0_13) ✅ PASSED 350.964
perf_tcp_single_pps_sriov (lisa_0_15) ✅ PASSED 205.895
perf_tcp_max_pps_sriov (lisa_0_17) ✅ PASSED 143.893

@vyadavmsft vyadavmsft requested a review from LiliDeng July 7, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants