Skip to content

Allow 10G breakouts#2174

Merged
osfrickler merged 1 commit intoosism:mainfrom
fzakfeld:allow-10G-breakouts
Apr 15, 2026
Merged

Allow 10G breakouts#2174
osfrickler merged 1 commit intoosism:mainfrom
fzakfeld:allow-10G-breakouts

Conversation

@fzakfeld
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Freerk-Ole Zakfeld <[email protected]>
Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The breakout mode detection now checks for the substring '10G' but the rest of the code uses explicit numeric strings (e.g., '25000'); consider centralizing the mapping from breakout mode strings to numeric speeds (e.g., a dict) so new modes can be added consistently and you don't rely on fragile substring checks.
  • In _get_breakout_port_valid_speeds, the valid speeds for 10G are limited to 10000,1000; if the platform supports lower speeds (e.g., 100M) or if there are other constraints, it might be worth aligning this list with the same rules used for the 25G/50G cases or with hardware capabilities to avoid inconsistent behavior.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The breakout mode detection now checks for the substring '10G' but the rest of the code uses explicit numeric strings (e.g., '25000'); consider centralizing the mapping from breakout mode strings to numeric speeds (e.g., a dict) so new modes can be added consistently and you don't rely on fragile substring checks.
- In `_get_breakout_port_valid_speeds`, the valid speeds for 10G are limited to `10000,1000`; if the platform supports lower speeds (e.g., 100M) or if there are other constraints, it might be worth aligning this list with the same rules used for the 25G/50G cases or with hardware capabilities to avoid inconsistent behavior.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@berendt berendt requested a review from osfrickler April 14, 2026 15:21
@osfrickler osfrickler merged commit 58c5b8b into osism:main Apr 15, 2026
3 checks passed
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.

2 participants