-
Notifications
You must be signed in to change notification settings - Fork 167
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 support to media settings parser for parsing gearbox media settings #579
base: master
Are you sure you want to change the base?
Add support to media settings parser for parsing gearbox media settings #579
Conversation
/azp run |
The committers listed above are authorized under a signed CLA. |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -192,6 +259,33 @@ | |||
} | |||
} | |||
|
|||
media_settings_gb_default = { |
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.
@j-mazurek is there any HLD describing these? Like how OA knows this SI setting corresponds to gearbox line side or not?
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.
if xcvrd.check_port_in_range(port, physical_port): | ||
media_dict = g_dict[GLOBAL_MEDIA_SETTINGS_KEY][keys] | ||
if gearbox_side: | ||
if GEARBOX_GLOBAL_MEDIA_SETTINGS_KEY in g_dict: |
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.
@j-mazurek can you write a separate function get_gb_media_settings()
do the necessary refactor?
@@ -208,9 +208,13 @@ def get_media_settings_for_speed(settings_dict, lane_speed_key): | |||
return settings_dict.get(LANE_SPEED_DEFAULT_KEY, {}) | |||
|
|||
|
|||
def get_media_settings_value(physical_port, key): | |||
def get_media_settings_value(physical_port, key, gearbox_side=None): |
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.
@j-mazurek please rename this to get_asic_media_settings()
and keep it separate from get_gb_media_settings()` (see my comments below)
What I did
Added support to media_settings_parser in xcvrd to parse gearbox tuning values from media_settings.json.
Description
Added GEARBOX_GLOBAL_MEDIA_SETTINGS and GEARBOX_PORT_MEDIA_SETTINGS as top-level search keys for media_settings_parser.py in xcvrd.
Expanded get_media_settings() to parse gearbox values
Gearbox tuning values (line-side and system-side) parsed from media_settings.json will be published to APPL_DB alongside ASIC values.
Motivation and Context
This change is part of the Dynamic Gearbox Tuning feature. Allows parsing gearbox tuning values from media_settings.json.
How Has This Been Tested?
Using a custom media_settings.json file, verified that port tables in APPL_DB were being correctly set with the proper values for ASIC tx_taps as well as line-side and system-side gearbox tx_taps.
Verified against current unit tests.
Added unit test cases in test_xcvrd.py to cover new changes.