Skip to content

Create sub CMIS FSM for DP decomission #608

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 11 commits into
base: master
Choose a base branch
from

Conversation

AnoopKamath
Copy link
Contributor

@AnoopKamath AnoopKamath commented Apr 24, 2025

Description

Fix : sonic-net/sonic-buildimage#21603

Create a sub CMIS FSM while decommissioning the DPs. Each of these state will be non blocking wait to avoid device getting stuck in one state. Also, set the decommission glag at physical port layer to help mix mode settings

Motivation and Context

How Has This Been Tested?

Decommission lanes of the port which doesn't has required AppCode set to default

2025 Apr 30 23:16:01.293831 sonic NOTICE pmon#xcvrd[27]: CMIS: Ethernet268: Decommissioned Successfully physical port [33]
2025 Apr 30 23:16:01.293899 sonic INFO pmon#supervisord: xcvrd NOTICE:xcvrd:CMIS: Ethernet268: Decommissioned Successfully physical port [33]
2025 Apr 30 23:16:01.451007 sonic NOTICE pmon#xcvrd[27]: CMIS: Ethernet280: Decommissioned Successfully physical port [35]
2025 Apr 30 23:16:01.451088 sonic INFO pmon#supervisord: xcvrd NOTICE:xcvrd:CMIS: Ethernet280: Decommissioned Successfully physical port [35]
2025 Apr 30 23:16:01.492465 sonic NOTICE pmon#xcvrd[27]: CMIS: Ethernet244: Decommissioned Successfully physical port [30]
2025 Apr 30 23:16:01.492547 sonic INFO pmon#supervisord: xcvrd NOTICE:xcvrd:CMIS: Ethernet244: Decommissioned Successfully physical port [30]
2025 Apr 30 23:16:01.563489 sonic NOTICE pmon#xcvrd[27]: CMIS: Ethernet264: Decommissioned Successfully physical port [33]
2025 Apr 30 23:16:01.563636 sonic INFO pmon#supervisord: xcvrd NOTICE:xcvrd:CMIS: Ethernet264: Decommissioned Successfully physical port [33]
2025 Apr 30 23:16:01.660994 sonic NOTICE pmon#xcvrd[27]: CMIS: Ethernet164: Decommissioned Successfully physical port [20]
2025 Apr 30 23:16:01.661135 sonic INFO pmon#supervisord: xcvrd NOTICE:xcvrd:CMIS: Ethernet164: Decommissioned Successfully physical port [20]
2025 Apr 30 23:16:15.646395 sonic NOTICE pmon#xcvrd[27]: CMIS: Ethernet284: Decommissioned Successfully physical port [35]
2025 Apr 30 23:16:15.646519 sonic INFO pmon#supervisord: xcvrd NOTICE:xcvrd:CMIS: Ethernet284: Decommissioned Successfully physical port [35]
2025 Apr 30 23:16:15.847901 sonic NOTICE pmon#xcvrd[27]: CMIS: Ethernet324: Decommissioned Successfully physical port [40]
2025 Apr 30 23:16:15.848038 sonic INFO pmon#supervisord: xcvrd NOTICE:xcvrd:CMIS: Ethernet324: Decommissioned Successfully physical port [40]
2025 Apr 30 23:16:16.022971 sonic NOTICE pmon#xcvrd[27]: CMIS: Ethernet240: Decommissioned Successfully physical port [30]
2025 Apr 30 23:16:16.023098 sonic INFO pmon#supervisord: xcvrd NOTICE:xcvrd:CMIS: Ethernet240: Decommissioned Successfully physical port [30]
2025 Apr 30 23:16:16.331959 sonic NOTICE pmon#xcvrd[27]: CMIS: Ethernet160: Decommissioned Successfully physical port [20]
2025 Apr 30 23:16:16.332114 sonic INFO pmon#supervisord: xcvrd NOTICE:xcvrd:CMIS: Ethernet160: Decommissioned Successfully physical port [20]
2025 Apr 30 23:16:16.403968 sonic NOTICE pmon#xcvrd[27]: CMIS: Ethernet320: Decommissioned Successfully physical port [40]
2025 Apr 30 23:16:16.404111 sonic INFO pmon#supervisord: xcvrd NOTICE:xcvrd:CMIS: Ethernet320: Decommissioned Successfully physical port [40]
2025 Apr 30 23:16:36.476933 sonic NOTICE pmon#xcvrd[27]: CMIS: Ethernet268: Decommissioned Successfully physical port [33]
2025 Apr 30 23:16:36.476933 sonic INFO pmon#supervisord: xcvrd NOTICE:xcvrd:CMIS: Ethernet268: Decommissioned Successfully physical port [33]

Additional Information (Optional)

@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).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AnoopKamath AnoopKamath marked this pull request as ready for review April 30, 2025 08:28
@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).

@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).

@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).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AnoopKamath
Copy link
Contributor Author

@prgeor, @mihirpat1 : Could you please review these changes?

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.

@AnoopKamath can you check the proposal sent offline?

@vivekrnv
Copy link
Contributor

vivekrnv commented May 6, 2025

Hi @AnoopKamath, did you get a chance to look at the updated proposal?

@AnoopKamath
Copy link
Contributor Author

Hi @AnoopKamath, did you get a chance to look at the updated proposal?

Hi @vivekrnv : Had meeting with @prgeor offline and working on new proposal. Will update the review soon

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@prgeor
Copy link
Collaborator

prgeor commented May 12, 2025

@AnoopKamath branch conflict

@@ -1324,6 +1359,11 @@ def task_worker(self):
self.post_port_active_apsel_to_db(api, lport, host_lanes_mask, reset_apsel=True)
self.update_port_transceiver_status_table_sw_cmis_state(lport, CMIS_STATE_READY)
continue
elif self.is_decommission_required(lport, api):
self.port_dict[lport]['is_decomm_required'] = True
api.decommission_all_datapaths(False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@AnoopKamath are you proposing to change the API? It does not take any argument True/False?

@@ -815,13 +821,26 @@ def get_cmis_media_lanes_mask(self, api, appl, lport, subport):

return media_lanes_mask

def is_appl_reconfigure_required(self, api, app_new):
def is_decommission_required(self, lport, api):
Copy link
Collaborator

Choose a reason for hiding this comment

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

@AnoopKamath given the fact that the default application is not matching with configured speed, is it safe to say that we need to decommission all 8 lanes for both:-

  1. No breakout
  2. Subport with same application
  3. Subport with mixed application

My understanding its safe decommission all 8 lanes (for all 3 above cases) because I can't think of a mixed application as the default. If not, can you give me an example?

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.

Some INNOLIGHT 800G QSFP-DDs get stuck in CMIS DP_INIT intermittently
4 participants