Skip to content

lspci: use controller_id for NVMe discovery, exclude ASAP by device_id#4468

Merged
LiliDeng merged 1 commit into
mainfrom
pavan/lspci_nvme
May 8, 2026
Merged

lspci: use controller_id for NVMe discovery, exclude ASAP by device_id#4468
LiliDeng merged 1 commit into
mainfrom
pavan/lspci_nvme

Conversation

@pupacha
Copy link
Copy Markdown
Collaborator

@pupacha pupacha commented May 7, 2026

Description

Previosuly, NVMe devices are discovered filtering on the device id maintained in DEVICE_ID_DICT. This was because both NVMe and ASAP device have same controller (0108). But this approach mandates, every kind of nvme device id to be added into the DEVICE_ID_DICT which is not scalable.

Instead, fetch the devices using the nvme controller itself and then filter out the ASAP devices based on its device id.

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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 refactors PCI/NVMe discovery in Lspci to identify NVMe devices by their controller ID (0108) rather than maintaining an ever-growing allowlist of NVMe device IDs, while explicitly filtering out ASAP devices by device ID to avoid misclassification.

Changes:

  • Switch NVMe discovery in get_device_names_by_type / get_devices_by_type to rely on controller IDs instead of NVMe device IDs.
  • Exclude ASAP devices during controller-based discovery by filtering known ASAP device IDs.

Comment thread lisa/tools/lspci.py
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

✅ AI Test Selection — PASSED

4 test case(s) selected (view run)

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

Count
✅ Passed 4
❌ Failed 0
⏭️ Skipped 0
Total 4
Test case details
Test Case Status Time (s) Message
verify_nvme_rescind (lisa_0_0) ✅ PASSED 13.865
verify_nvme_sriov_rescind (lisa_0_1) ✅ PASSED 19.808
verify_gpu_rescind_validation (lisa_0_3) ✅ PASSED 12.452
verify_gpu_provision (lisa_0_2) ✅ PASSED 130.395

Previosuly, NVMe devices are discovered filtering on the device id
maintained in DEVICE_ID_DICT. This was because both NVMe and ASAP device
have same controller (0108). But this approach mandates, every kind of
nvme device id to be added into the DEVICE_ID_DICT which is not
scalable.

Instead, fetch the devices using the nvme controller itself and then
filter out the ASAP devices based on its device id.
@pupacha pupacha force-pushed the pavan/lspci_nvme branch from c7392b4 to 2342008 Compare May 8, 2026 10:33
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

✅ AI Test Selection — PASSED

4 test case(s) selected (view run)

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

Count
✅ Passed 4
❌ Failed 0
⏭️ Skipped 0
Total 4
Test case details
Test Case Status Time (s) Message
verify_gpu_rescind_validation (lisa_0_3) ✅ PASSED 8.908
verify_gpu_provision (lisa_0_2) ✅ PASSED 34.974
verify_nvme_rescind (lisa_0_0) ✅ PASSED 9.969
verify_nvme_sriov_rescind (lisa_0_1) ✅ PASSED 15.443

@LiliDeng LiliDeng merged commit ab3caa4 into main May 8, 2026
61 checks passed
@LiliDeng LiliDeng deleted the pavan/lspci_nvme branch May 8, 2026 15:33
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