Skip to content

Fix port SI setting per speed during speed change #649

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pavannaregundi
Copy link

@pavannaregundi pavannaregundi commented Jul 25, 2025

This change fixes the issue of port media settings not getting applied when speed change command is issued in CLI.

Description

Fix the issue of port SI settings not getting applied during the speed change with a CLI executions.

Motivation and Context

fixes sonic-net/sonic-buildimage#23480
This change will also bring the code inline with HLD https://github.com/sonic-net/SONiC/blob/master/doc/port-si/Port_SI_Per_Speed.md

HOW:

  • Changed handle_port_change_event() in SfpStateUpdateTask to monitor any change in 'speed' by caching the previous values and added support to trigger PORT_SET event.
  • Added support for handling PORT_SET change event in on_port_config_change() for SfpStateUpdateTask.
  • PORT_SET event will trigger notify_media_setting() which reflects SI settings relevant for speed.

How Has This Been Tested?

Verify the syslog and redis db to check applied SI settings after a speed change. Steps and log of verification is attached
media_settings_with_speed_change.txt.txt

Also verified xcvrd kill and pmon docker restart.

Additional Information (Optional)

Which release branch to backport (provide reason below if selected)

  • 202505

This change fixes the issue of port media settings not getting applied
when speed change command is issued in CLI.

Signed-off-by: Pavan Naregundi <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavannaregundi pavannaregundi force-pushed the media_setting_per_speed branch from 4335943 to 60f975f Compare July 25, 2025 12:50
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavannaregundi pavannaregundi force-pushed the media_setting_per_speed branch from 60f975f to 4ada69a Compare July 25, 2025 16:27
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@pavannaregundi
Copy link
Author

@mihirpat1 @prgeor @tshalvi Can you please review this PR.

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.

Bug: Media Settings not being applied during speed change
2 participants