sonic-platform-daemons icon indicating copy to clipboard operation
sonic-platform-daemons copied to clipboard

reset active application code as 'N/A' when port shutdown

Open chiourung opened this issue 1 year ago • 4 comments

Description

Motivation and Context

In the add_rack test, it would compare the TRANSCEIVER_INFO for two cases: case 1. config reload (the admin status of Ethernet64 is down in config_db.json) case 2. config reload (the admin status of Ethernet64 is up in config_db.json) and then shutdown Ethernet64

In case 1. it would not do CMIS init and the active application is 'N/A'. In case 2. it would do CMIS init first and then disable TX. The active application would retain the value of the last CMIS init. => Modify the code to reset the active application on port shutdown to ensure that the active application would be the same for the above two cases.

How Has This Been Tested?

root@ais800-64o-1:/# show interfaces status Ethernet0
  Interface        Lanes    Speed    MTU    FEC          Alias    Vlan    Oper    Admin                           Type    Asym PFC
-----------  -----------  -------  -----  -----  -------------  ------  ------  -------  -----------------------------  ----------
  Ethernet0  25,26,27,28     400G   9100    N/A  Eth1/1(Port1)  routed      up       up  OSFP 8X Pluggable Transceiver         off
root@ais800-64o-1:/# show interfaces transceiver eeprom Ethernet0
Ethernet0: SFP EEPROM detected
        Active Firmware: N/A
        Active application selected code assigned to host lane 1: 2
        Active application selected code assigned to host lane 2: 2
        Active application selected code assigned to host lane 3: 2
        Active application selected code assigned to host lane 4: 2
        Active application selected code assigned to host lane 5: N/A
        Active application selected code assigned to host lane 6: N/A
        Active application selected code assigned to host lane 7: N/A
        Active application selected code assigned to host lane 8: N/A
        Application Advertisement: 800G L C2M (placeholder) - Host Assign (0x1) - 800GBASE-DR8-2 (placeholder) - Media Assign (0x1)
                                   400GAUI-4-L C2M (Annex 120G) - Host Assign (0x11) - 400G-FR4/400GBASE-FR4 (Cl 151) - Media Assign (0x11)
                                   200GAUI-2-L C2M (Annex 120G) - Host Assign (0x55) - Undefined - Media Assign (0x55)
                                   100GAUI-1-L C2M (Annex 120G) - Host Assign (0xff) - 100G-FR/100GBASE-FR1 (Cl 140) - Media Assign (0xff)
                                   200GAUI-4 C2M (Annex 120E) - Host Assign (0x11) - 200GBASE-FR4 (Cl 122) - Media Assign (0x11)
        CMIS Rev: 5.0
        Connector: LC
        Encoding: N/A
        Extended Identifier: Power Class 7 (14.0W Max)
        Extended RateSelect Compliance: N/A
        Host Lane Count: 4
        Identifier: OSFP 8X Pluggable Transceiver
        Inactive Firmware: N/A
        Length Cable Assembly(m): 0.0
        Media Interface Technology: 1310 nm EML
        Media Lane Count: 4
        Module Hardware Rev: 1.0
        Nominal Bit Rate(100Mbs): 0
        Specification compliance: sm_media_interface
        Supported Max Laser Frequency: N/A
        Supported Max TX Power: N/A
        Supported Min Laser Frequency: N/A
        Supported Min TX Power: N/A
        Vendor Date Code(YYYY-MM-DD Lot): 2024-03-22
        Vendor Name: Edgecore
        Vendor OUI: 3c-2c-99
        Vendor PN: ET8001-2FR4
        Vendor Rev: 50
        Vendor SN: L12412000257
root@ais800-64o-1:/# config interface shutdown Ethernet0
root@ais800-64o-1:/# show interfaces transceiver eeprom Ethernet0
Ethernet0: SFP EEPROM detected
        Active Firmware: N/A
        Active application selected code assigned to host lane 1: N/A
        Active application selected code assigned to host lane 2: N/A
        Active application selected code assigned to host lane 3: N/A
        Active application selected code assigned to host lane 4: N/A
        Active application selected code assigned to host lane 5: N/A
        Active application selected code assigned to host lane 6: N/A
        Active application selected code assigned to host lane 7: N/A
        Active application selected code assigned to host lane 8: N/A
        Application Advertisement: 800G L C2M (placeholder) - Host Assign (0x1) - 800GBASE-DR8-2 (placeholder) - Media Assign (0x1)
                                   400GAUI-4-L C2M (Annex 120G) - Host Assign (0x11) - 400G-FR4/400GBASE-FR4 (Cl 151) - Media Assign (0x11)
                                   200GAUI-2-L C2M (Annex 120G) - Host Assign (0x55) - Undefined - Media Assign (0x55)
                                   100GAUI-1-L C2M (Annex 120G) - Host Assign (0xff) - 100G-FR/100GBASE-FR1 (Cl 140) - Media Assign (0xff)
                                   200GAUI-4 C2M (Annex 120E) - Host Assign (0x11) - 200GBASE-FR4 (Cl 122) - Media Assign (0x11)
        CMIS Rev: 5.0
        Connector: LC
        Encoding: N/A
        Extended Identifier: Power Class 7 (14.0W Max)
        Extended RateSelect Compliance: N/A
        Host Lane Count: N/A
        Identifier: OSFP 8X Pluggable Transceiver
        Inactive Firmware: N/A
        Length Cable Assembly(m): 0.0
        Media Interface Technology: 1310 nm EML
        Media Lane Count: N/A
        Module Hardware Rev: 1.0
        Nominal Bit Rate(100Mbs): 0
        Specification compliance: sm_media_interface
        Supported Max Laser Frequency: N/A
        Supported Max TX Power: N/A
        Supported Min Laser Frequency: N/A
        Supported Min TX Power: N/A
        Vendor Date Code(YYYY-MM-DD Lot): 2024-03-22
        Vendor Name: Edgecore
        Vendor OUI: 3c-2c-99
        Vendor PN: ET8001-2FR4
        Vendor Rev: 50
        Vendor SN: L12412000257

Additional Information (Optional)

chiourung avatar Oct 22 '24 09:10 chiourung

@chiourung please share the output of show interface transceiver info when port is up and port is down

prgeor avatar Oct 22 '24 18:10 prgeor

@chiourung please fix the build error

prgeor avatar Oct 22 '24 18:10 prgeor

@chiourung please share the output of show interface transceiver info when port is up and port is down

Update in Description

chiourung avatar Oct 23 '24 03:10 chiourung

@chiourung please fix the build error

Done

chiourung avatar Oct 23 '24 03:10 chiourung

@chiourung Please help in fixing the build failure.

mihirpat1 avatar Dec 04 '24 18:12 mihirpat1

/azpw run

chiourung avatar Dec 05 '24 01:12 chiourung

/AzurePipelines run

mssonicbld avatar Dec 05 '24 01:12 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Dec 05 '24 01:12 azure-pipelines[bot]

@chiourung Please help in fixing the build failure.

The build failure is

+ sudo dpkg -i 'libnl-3-200_*.deb'
dpkg: error: cannot access archive 'libnl-3-200_*.deb': No such file or directory

##[error]Bash exited with code '2'.

chiourung avatar Dec 05 '24 02:12 chiourung

/azpw run

chiourung avatar Dec 10 '24 02:12 chiourung

/AzurePipelines run

mssonicbld avatar Dec 10 '24 02:12 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Dec 10 '24 02:12 azure-pipelines[bot]

/azpw run

chiourung avatar Dec 13 '24 00:12 chiourung

/AzurePipelines run

mssonicbld avatar Dec 13 '24 00:12 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Dec 13 '24 00:12 azure-pipelines[bot]