Skip to content

Conversation

@j-mazurek
Copy link

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.

@mssonicbld
Copy link
Collaborator

/azp run

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 20, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

}
}

media_settings_gb_default = {
Copy link
Collaborator

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

@prgeor prgeor requested a review from mihirpat1 February 14, 2025 16:34
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:
Copy link
Collaborator

@prgeor prgeor Feb 15, 2025

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?



def get_media_settings_value(physical_port, key):
def get_media_settings_value(physical_port, key, gearbox_side=None):
Copy link
Collaborator

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)

@prgeor
Copy link
Collaborator

prgeor commented Mar 22, 2025

@j-mazurek can you please link the HLD in the PR description

@prgeor
Copy link
Collaborator

prgeor commented Apr 7, 2025

@j-mazurek there is a merge conflict

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.

4 participants