Skip to content
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

Add speed media key for non CMIS cable #512

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Junchao-Mellanox
Copy link
Collaborator

Description

There is a function get_media_settings_key in media_settings_parser.py which is used to extract media setting keys for a given module. The key contains 3 parts: vendor key, media key, speed lane key.

  1. Currently, speed lane key for non CMIS module is always None. For a given module, it could apply different media setting values when it is working on different speed. So, we need to add speed lane key for non CMIS module.

  2. Currently, media key for non CMIS module does not consider the "Extended Specification Compliance". So, the media key could be something like "QSFP+-Extended-255M" or "QSFP+-Unknown-255M", this media key is not good enough. This PR also extends the media key.

Motivation and Context

Add media key and speed key for non CMIS cable.

How Has This Been Tested?

unit test

Additional Information (Optional)

keboliu
keboliu previously approved these changes Jul 9, 2024
@keboliu keboliu requested a review from mihirpat1 July 9, 2024 02:21
@HaiHuang008
Copy link

Hi @Junchao-Mellanox, I'm also keeping an eye on this issue. I have a few minor suggestions regarding this.
For the get_lane_speed_key method, the application advertisement in some optical modules does not fully display the supported speeds, so I think it is worth considering having a default lane speed key (via port speed / lane_count ). Return lane_speed_key as a list allows more flexibility and compatibility.
You can refer to my patch:media_settings_parser.patch

@Junchao-Mellanox
Copy link
Collaborator Author

Hi @prgeor , @mihirpat1 , could you please review @HaiHuang008 's suggestion? It looks good to me.

@liat-grozovik
Copy link
Collaborator

Hi @prgeor , @mihirpat1 , could you please review @HaiHuang008 's suggestion? It looks good to me.

kindly reminder as this is needed also for 202405

speed_per_lane_int = int(speed_per_lane)
if speed_per_lane - speed_per_lane_int == 0:
speed_per_lane = speed_per_lane_int
lane_speed_key = LANE_SPEED_KEY_PREFIX + str(speed_per_lane) + 'G:' + str(lane_count)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Junchao-Mellanox why we need lookup for number of lanes? do you have sample media_setting.json with this for non-CMIS cable? Is this key with no of lanes captured in any HLD?

@prgeor
Copy link
Collaborator

prgeor commented Jul 26, 2024

Hi @Junchao-Mellanox, I'm also keeping an eye on this issue. I have a few minor suggestions regarding this. For the get_lane_speed_key method, the application advertisement in some optical modules does not fully display the supported speeds, so I think it is worth considering having a default lane speed key (via port speed / lane_count ). Return lane_speed_key as a list allows more flexibility and compatibility. You can refer to my patch:media_settings_parser.patch

@HaiHuang008 You mean some CMIS cable don't advertise application speed?

Copy link
Collaborator

@prgeor prgeor left a comment

Choose a reason for hiding this comment

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

@Junchao-Mellanox Doesn't this PR also achieve the same? #533

@HaiHuang008
Copy link

@prgeor Yes, some cables do not advertise application speed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants