-
Notifications
You must be signed in to change notification settings - Fork 361
adding support for pci class accelerator #6255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
adding support for pci class accelerator #6255
Conversation
Summary of ChangesHello @saijanani-c, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
WalkthroughA new PCI class ID mapping is added to the Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Pre-merge checks✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly adds support for the 'accelerator' PCI class. My review includes a comment with suggestions to improve testing coverage and the maintainability of the PCI class dictionary, which would be beneficial to address.
| "0280": "net", | ||
| "0207": "net", | ||
| "0c03": "usb", | ||
| "1200": "accelerator", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this addition is correct, there are a couple of ways to improve the quality of this module:
-
Testing: The
get_pci_class_namefunction is not covered by unit tests inselftests/unit/utils/pci.py. Please add tests to verify this new 'accelerator' class and ideally the existing ones to prevent future regressions. -
Maintainability: The
pci_class_diccould be improved by defining it as a module-level constant and keeping its keys sorted. This would improve performance by avoiding its recreation on every call and make it easier to maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
avocado/utils/pci.py (1)
158-158: Add test coverage for the new "1200" PCI class mapping.PCI class code 0x12 is officially designated for "Processing Accelerators." The mapping
"1200": "accelerator"is correct and follows the existing naming convention in the dictionary (singular, lowercase entries). However, the test file does not currently include coverage for theget_pci_class_name()function, including this new mapping.
|
/packit copr-build |
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.