Skip to content

Conversation

vdahiya12
Copy link
Contributor

@vdahiya12 vdahiya12 commented Jun 9, 2025

Description

The key change adds support for selectively applying the unreliable_los media setting to APP_DB, controlled via a new boolean argument is_unreliable_los_setting_required in the notify_media_setting() function

During link shutdown orchagent will use this setting to make sure that during a port flap, the orchagent applied the proper media settings after this has been consumed by orchagent.

Motivation and Context

How Has This Been Tested?

goes with sonic-net/sonic-swss#3663

The following test-scenarios was covered to see unreliable LOS is enabled and param phy_ctrl_unreliable_los is enabled in State DB:

  • cold boot 100 times
  • config reload
  • xcvrd/pmon restart
  • cold-reboot/swss restart
  • apply manual settings in APP DB to ascertain change applies correctly
  • Link shut/unshut 100 time, link comes up with the required settings.
  • warm-reboot works as intended, link does not go down as well as settings is maintained
admin@sonic:~$ sudo redis-cli -n 0 hgetall "PORT_TABLE:Ethernet4"
 1) "admin_status"
 2) "up"
 3) "alias"
 4) "Ethernet2/1"
 5) "description"
 6) "Ethernet2/1"
 7) "index"
 8) "2"
 9) "lanes"
10) "65,66,67,68"
11) "mtu"
12) "9100"
13) "pfc_asym"
14) "off"
15) "speed"
16) "40000"
17) "oper_status"
18) "up"
19) "flap_count"
20) "3"
21) "last_up_time"
22) "Fri May 25 08:11:22 2025"
23) "interface_type"
24) "sr4"
25) "apply_unreliable_los"
26) "on"
27) "last_down_time"
28) "Fri May 25 08:11:10 202"
admin@sonic:~$ sudo redis-cli -n 6 hgetall "PORT_TABLE|Ethernet4"
 1) "state"
 2) "ok"
 3) "netdev_oper_status"
 4) "up"
 5) "admin_status"
 6) "up"
 7) "mtu"
 8) "9100"
 9) "supported_speeds"
10) "40000"
11) "supported_fecs"
12) "none,fc"
13) "host_tx_ready"
14) "true"
15) "speed"
16) "40000"
17) "fec"
18) "N/A"
19) "NPU_SI_SETTINGS_SYNC_STATUS"
20) "NPU_SI_SETTINGS_NOTIFIED"
21) "phy_ctrl_unreliable_los"
22) "true"

admin@sonic:~$ bcmcmd "phy diag xe17 dsc config" | grep -C 2 "LOS"
Brdfe_on                    = 0
Media Type                  = 2
Unreliable LOS              = 1
Scrambling Disable          = 0
CL93/72 Training Enable     = 0
--
Brdfe_on                    = 0
Media Type                  = 2
Unreliable LOS              = 1
Scrambling Disable          = 0
CL93/72 Training Enable     = 0
--
Brdfe_on                    = 0
Media Type                  = 2
Unreliable LOS              = 1
Scrambling Disable          = 0
CL93/72 Training Enable     = 0
--
Brdfe_on                    = 0
Media Type                  = 2
Unreliable LOS              = 1
Scrambling Disable          = 0
CL93/72 Training Enable     = 0
admin@str-7260cx3-acs-1:~$

Details if related
MSFT ADO

32883681
Tested on the testbed as well as UT

Additional Information (Optional)

required for consumption by swss with warm-reboot flow

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

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vdahiya12 vdahiya12 requested a review from prgeor June 12, 2025 17:38
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