Add the ability to specify the network device under test speed#850
Add the ability to specify the network device under test speed#850kostyanf14 merged 1 commit intoHCK-CI:masterfrom
Conversation
Summary of ChangesHello @kostyanf14, 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 introduces a new capability to control the network speed of Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces the capability to specify the network speed for the virtio-net-pci device under test via a new --net-test-speed command-line option. The changes are well-integrated, flowing from the CLI parsing down to the QEMU machine configuration. The implementation is logical and follows the existing patterns in the codebase. I have one minor suggestion to improve type consistency.
| include Helper | ||
|
|
||
| CONFIG_JSON = 'lib/setupmanagers/qemuhck/network_manager.json' | ||
| DEFAULT_NET_SPEED = '10000' # 10G |
There was a problem hiding this comment.
For consistency with the --net-test-speed command-line option which is parsed as an Integer, it's better to define DEFAULT_NET_SPEED as an integer as well. This will ensure that the @net_test_speed instance variable always holds a value of the same type, improving code clarity and maintainability.
DEFAULT_NET_SPEED = 10000 # 10GThere was a problem hiding this comment.
Pull request overview
This PR adds the ability to configure the network device speed for virtio-net-pci devices under test through a new CLI option --net-test-speed. The feature allows users to specify custom network speeds in Mbps, defaulting to 10000 Mbps (10 Gbps).
Changes:
- Added
--net-test-speedCLI option to specify network test speed in Mbps - Updated network manager to apply configurable speed to test devices and default speed to other network device types
- Modified virtio-net-pci device configuration to include the speed parameter in QEMU command line
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/cli.rb | Added new --net-test-speed CLI option with Integer type, default 10000 Mbps |
| lib/setupmanagers/qemuhck/qemuhck.rb | Passes net_test_speed from test options to client VM options; refactored to use test_opt variable for consistency |
| lib/setupmanagers/qemuhck/qemu_machine.rb | Updated NetworkManager initialization to pass options parameter |
| lib/setupmanagers/qemuhck/network_manager.rb | Added DEFAULT_NET_SPEED constant, retrieves net_test_speed from options, applies custom speed to test devices and default to others |
| lib/setupmanagers/qemuhck/devices/virtio-net-pci.json | Added speed parameter to virtio-net-pci device command line |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Works for virtio-net-pci only. Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Works for virtio-net-pci only.