Skip to content
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

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

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

Conversation

chiourung
Copy link
Contributor

@chiourung chiourung commented Oct 22, 2024

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)

@prgeor
Copy link
Collaborator

prgeor commented Oct 22, 2024

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

@prgeor
Copy link
Collaborator

prgeor commented Oct 22, 2024

@chiourung please fix the build error

@chiourung
Copy link
Contributor Author

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

Update in Description

@chiourung
Copy link
Contributor Author

@chiourung please fix the build error

Done

@prgeor prgeor requested a review from mihirpat1 December 1, 2024 14:43
Copy link
Collaborator

@prgeor prgeor left a comment

Choose a reason for hiding this comment

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

@mihirpat1 can you review?

@@ -1468,6 +1489,7 @@ def task_worker(self):
self.log_notice("{} Forcing Tx laser OFF".format(lport))
# Force DataPath re-init
api.tx_disable_channel(media_lanes_mask, True)
self.reset_port_active_apsel_to_db(lport, host_lanes_mask)
Copy link
Contributor

Choose a reason for hiding this comment

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

@chiourung Can we reuse post_port_active_apsel_to_db function and introduce an additional argument to ignore reading the active application to reduce code replication?

@mihirpat1
Copy link
Contributor

@chiourung Please help in fixing the build failure.

@chiourung
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@chiourung
Copy link
Contributor Author

@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
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@chiourung
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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