Fix: fallback to lspci for NIC model name when not found in udevadm#670
Merged
harp-intel merged 4 commits intomainfrom Mar 25, 2026
Merged
Fix: fallback to lspci for NIC model name when not found in udevadm#670harp-intel merged 4 commits intomainfrom
harp-intel merged 4 commits intomainfrom
Conversation
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves NIC identification and reporting in PerfSpect by making NIC model detection more reliable (with a lspci fallback) and refining NIC summarization to better represent physical hardware.
Changes:
- Update NIC info collection script to fall back to
lspciwhen udev-based model lookup is missing, and add required dependencies (lspci,pci.ids.gz). - Adjust NIC summary generation to filter out non-physical NICs and provide a vendor-based default model when missing.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
internal/script/scripts.go |
Adds lspci fallback logic for NIC model name extraction and extends script dependencies. |
internal/extract/nic.go |
Updates NIC summary logic to exclude certain interfaces and to handle missing model names more explicitly. |
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the accuracy and reliability of NIC (Network Interface Card) detection and summarization in the system by enhancing how NIC model information is extracted and reported. The changes focus on providing better fallback mechanisms when model information is missing, filtering out non-physical NICs from summaries, and updating dependencies to ensure all necessary tools are available.
NIC Model Extraction and Summarization Improvements:
lspcifor model information if it's not available fromudevadm, and to trim vendor prefixes from model names for cleaner output.nic.goto exclude virtual functions and bridge devices, ensuring only physical NICs are reported. Also, improved handling of missing model names by constructing a default from the vendor name.Dependency Updates:
lspciandpci.ids.gzas dependencies for the NIC information script to support the new fallback logic.