-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
CMIS Module Management Enhancement HLD #1453
CMIS Module Management Enhancement HLD #1453
Conversation
|
||
#### 6.1.2. Host TX Ready signal | ||
As mentioned earlier, currently SONIC assumes that as soon as the Admin Status is set to UP and the corresponding SAI call returns with OK/SUCCESS status, the "host_tx_ready" flag can be set in the STATE DB to trigger the CMIS State Machine for specific port. | ||
But it is not always a truth. ASIC port initialization process takes some time and this time can increase with move to new transceiver technologies (e.g. BiDi). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SONiC taken (~ 10-20 sec )to bring up the ports and complete the FSM, do you see any performance impact with this design tx_ready_signal ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no. This signal provides better sync between ASIC port init and start of CMIS state machine. The CMIS FSM requires the high-speed signal from ASIC prior to entering the DataPathInit state. So, waiting for this high-speed signal is inevitable to succeed in CMIS state machine.
Wondering if 10-20 sec is related to init of all ports ?
#### 6.3.3. Handling of HW-based “host_tx_ready” event | ||
Per description above, on the platform supporting new enhancements, the SDK/FW shall send an asynchronous notification of “host_tx_ready” to SWSS when the ASIC starts/stops sending high-speed signal to a module. | ||
|
||
The vendor SDK shall internally support this indication from ASIC (via the trap mechanism) and shall call the notification callback registered by Ports OA on initialization . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does SONiC be notified the whethernew tx_trap_signal trap supported or not? I believe it must be vendor CMIS implemetation must support this trap otherwise correct us!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SONIC (Ports OA) will perform the query capability for support of HW-based host_tx_ready notification. Then it will initializes the consumer for this notification only if Capability Query returned the indication of support on the platform. The vendor SAI will indicate its support of this notification ONLY if the trap from ASIC about start/stop of host_tx_ready signal is supported by ASIC/FW on the platform
SONiC Community review recording https://zoom.us/rec/share/IHXaeq-KLSq8Ig0HGoeIRvsbireqGh0xpVhwFaTNRdKYZKyZ7mUSgIijp-XxM3VA.kKt4Kh5LkkQk_5Ii |
With move to SW-based management of CMIS modules - when the ASIC side is configured by vendor SDK, and module side by SONIC, some problems have been identified with the current approach. | ||
|
||
#### 6.1.2. Host TX Ready signal | ||
As mentioned earlier, currently SONIC assumes that as soon as the Admin Status is set to UP and the corresponding SAI call returns with OK/SUCCESS status, the "host_tx_ready" flag can be set in the STATE DB to trigger the CMIS State Machine for specific port. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no assumption on host_tx_ready flag being set, the ASIC vendor SW have to make sure the valid transmission/tuning etc while processing/handling the attribute 'SAI_PORT_ATTR_ADMIN_STATE'.
What is the advantage of returning from SAI_PORT_ATTR_ADMIN_STATE for Up case without enabling the proper transmission ?
Can you please share the benchmark on completion of SAI_PORT_ATTR_ADMIN_STATE and reaching the transmission of high speed signal from your setup? IMO this will be couple of hundred ms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the advantage of returning from SAI_PORT_ATTR_ADMIN_STATE for Up case without enabling the proper transmission ?
Before transmitting to CMIS module mgmt, admin state UP was enough for FW to start transmitting high speed signal.
Then, we faces the unterminated transmition issue, and added a new criteria, to know that the module is plugged.
So from now on, the high speed signal will be sent only when admin=up and allow flag = true. means, the module is plugged in.
We need to do it to make sure that the high speed signal is not sent when module is not even plugged in.
Can you please share the benchmark on completion of SAI_PORT_ATTR_ADMIN_STATE and reaching the transmission of high speed signal from your setup? IMO this will be couple of hundred ms.
A benchmark is not relevan there, since it is per SerDes design, which is different between any vendor, and depends on module type, SerDes which are advanced or not etc.
|
||
#### 6.1.3. Unterminated Transmission | ||
With move to the SW-based module management, the module presence is handled by SONIC, and FW might be unaware of the module presence status. | ||
In this case, when the Admin status of a port is set to UP, FW can start transmitting the high-speed signal even without a plugged-in module. Such unterminated transmission can cause cross-talks to adjacent ports, high EMI, high BER and eventually shorten the transceiver lifetime so it is recommended that ASIC will not start sending the high-speed signal before a module is plugged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a usecase where the some amount power is saved when the transmission is not enabled in ASIC.
Can you please elaborate on unterminated transmission ? and how it cause cross-talks to adjacent ports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a usecase where the some amount power is saved when the transmission is not enabled in ASIC.
The reason for this enhancement is not power. it is a side affect.
The main reason here is to make sure the SerDes will not be damaged when high-speed signal will be sent without having a module plugged in to cage.
Can you please elaborate on unterminated transmission ? and how it cause cross-talks to adjacent ports?
Sending high-speed signal without having a plugged in module, can cause interruptions. for adjacent cables, it will cause more BER and again, can damage the SerDes.
@noaOrMlnx @liat-grozovik some open comments in this HLD to be taken care |
{ | ||
... | ||
... | ||
if (saiTxReadyNotifySupported && saiHwTxSignalEnabled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noaOrMlnx what about platform that does not support this hw notification mechanism? Can we have parity in behavior for both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prgeor
If a platform does not support notification mechanism, but does support the enable signal, then following situation can happen:
- host tx ready will not set to true when admin status is set to up.
- "allow" signal will be sent to lower layers saying the module is plugged in.
- host_tx_ready will never be set to TRUE since a notification that high-speed signal has been transmitted will never arrive.
That's the reason we need to make sure those 2 queries are supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noaOrMlnx I was referring to host_tx_ready which gets deleted from STATE_DB table after a warm-reboot. With your proposal, for platform that support notification mechanis, the host_tx_ready will be restored after warm-reboot. But for other platforms, host_tx_ready will remain deleted from STATE_DB table causing Xcvrd to bring the link down. See my previous comment above: We should not delete PORT_TABLE from STATE_DB table during warm-reboot that way we can keep the behavior same for all platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @prgeor
Can you explain why do you expect link-flap when host_tx_ready is deleted with the deletion of PORT_TABLE? It is the exact same behavior as before.
IMO reserving PORT_TABLE will not be the right solution.
In PORT_TABLE there are some other keys as 'oper_status'. We do not want to have this key reserved between boots, but we need to know the real status - if the port link is up or not.
That's why we get the real oper status after boot is done via query to SAI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noaOrMlnx oper_status i agree. I was talking about host_tx_ready
. Have you tested if PORT_TABLE's host_tx_ready
is not deleted ? The impact of host_tx_ready deleted during warm-reboot is Xcvrd re-initializing the CMIS optics causing link flap
|
||
|
||
##### 6.3.3.1. Warm-boot handling | ||
After warm-boot, SONiC will not receive a new “host_tx_ready” notification from SAI (because nothing has changed in ASIC/module). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noaOrMlnx I am not sure what is the usecase to have host_tx_ready updated during warm reboot? Xcvrd is not going to act upon this host_tx_ready notification anyways during warm reboot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prgeor The only reason here is to have STATE DB updated with lower layers status.
This was also discussed during HLD review, it is not mandatory but nice to have it all updated with the same status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noaOrMlnx can we preserve the STATE_DB's TRANSCEIVER_INFO table and PORT_TABLE (host_tx_ready) across warm-reboot so that it does not cause link flap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prgeor Hi Prince, As far as I checked, TRANSCEIVER_INFO table does not deleted when doing warm-reboot.
only PORT_TABLE.
For PORT_TABLE, please check my above comment, which explains why I think it will not be the solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noaOrMlnx it seems except few TABLES mentioned here other tables get deleted before warm-reboot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noaOrMlnx is your confirmation verified on a real switch? i.e if on warm-reboot host_tx_ready
does not get deleted from STATE_DB and hence does not need to be preserved and restored before and after warm-reboot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad, both tables are deleted during warm reboot
#### 6.2.2. host_tx_ready | ||
When the ASIC starts transmitting the high-speed signal toward a plugged module the vendor SAI should notify the SONIC (SWSS) of that via a new notification - SAI_SWITCH_ATTR_PORT_HOST_TX_READY_NOTIFY. | ||
|
||
The SWSS shall use this notification to set "host_tx_ready" flag in STATE DB which will trigger the CMIS initialization of the module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SWSS shall use this notification to set "host_tx_ready" flag in STATE DB which will trigger the CMIS initialization of the module. | |
The OA shall use this notification to set "host_tx_ready" flag in STATE DB which will trigger the CMIS initialization of the module. |
When a module is plugged in/out the PMON adds/deletes a per-port entry in the TRANSCIEVER_TABLE in STATE DB. | ||
This event shall be used by Ports OA as a trigger for enabling or disabling the host_tx_signal (using setting true/false to SAI_PORT_ATTR_HOST_TX_SIGNAL_ENABLE on the Port Object). | ||
|
||
To detect this insertion/removal event the Ports Orch Agent shall register for changes in the TRANSCIEVER_TABLE in STATE DB and will do the following: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noaOrMlnx AFAIK, STATE_DB TRANSCEIVER_TABLE is not preserved across warm-reboot. If so, my concern is during warm-reboot if the TRANSCEIVER_TABLE gets deleted, then SAI_PORT_ATTR_HOST_TX_SIGNAL_ENABLE could become FALSE after warm-reboot. Could you please check this.?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prgeor
Hi,
When we execute warm-reboot, the whole table is deleted. Since we are performing a reboot, it will happen after OA will stop, so no notification is received.
When OA is up again after reboot, the table is clean, so notification will be received only upon new info inserted to the table.
So for me it looks like we should not worry about it.
New PORT_HOST_TX_READY notification logic was added to sonic-sairedis and syncd in order to support host_tx_ready synchronization enhancements. HLD: sonic-net/SONiC#1453
in order to have the host_tx_ready enhancements, the table name is added to schema.h. HLD: sonic-net/SONiC#1453
@prgeor kindly reminder to the HLD PR review. do we still have open issue? |
@liat-grozovik i have some concern, on warm-reboot, rest all looks good. have put in the HLD comment and PR comment as well. next will sync up with @noaOrMlnx offline |
@noaOrMlnx Can you please update the Quality Metric (Alpha/Beta/GA) for the feature either in this PR comments or in HLD itself based on https://github.com/sonic-net/SONiC/blob/master/doc/SONiC%20feature%20quality%20definition.md |
Add design document to enhance host_tx_ready set process to State DB, to have full synchronization between asic and module configuration.
Quality: GA Level