sonic-swss
sonic-swss copied to clipboard
[gearbox] Support setting tx taps on gearbox ports
What I did This change adds support for setting tx tap or tuning values on gearbox ports. It uses the SAI attributes such as SAI_PORT_SERDES_ATTR_TX_FIR_PRE1 to communicate with SAI-based gearbox drivers. For the values, they are provided in the format like "system_tx_fir_pre2": [1,1] for an interface from gearbox_config.json.
Why I did it
How I verified it We verified that values provided in https://github.com/Azure/sonic-buildimage/pull/10084 are set to the chip with this change.
Added test to tests/test_gearbox.py. The added test will not pass until the following two changes (which should be merged first) are merged: Support SAI_PORT_ATTR_PORT_SERDES_ID on vs gearbox: https://github.com/Azure/sonic-sairedis/pull/1082 Add gearbox taps to vs gearbox_config.json: https://github.com/Azure/sonic-buildimage/pull/11480
Details if related
@byu343 do ensure that during warm-reboot we are not setting these taps because it can cause the port to flap?
What I did This change adds support for setting tx tap or tuning values on gearbox ports. It uses the SAI attributes such as SAI_PORT_SERDES_ATTR_TX_FIR_PRE1 to communicate with SAI-based gearbox drivers. For the values, they are provided in the format like "system_tx_fir_pre2": [1,1] for an interface from gearbox_config.json.
Why I did it
How I verified it We verified that values provided in Azure/sonic-buildimage#10084 are set to the chip with this change.
Details if related
@byu343 is this "system_tx_fir_pre2": [1,1]" format captured in HLD? can you point me the HLD?
@Pterosaur @jimmyzhai please review
@byu343 is this "system_tx_fir_pre2": [1,1]" format captured in HLD? can you point me the HLD?
No, this is no captured by HLD. I followed the existing format for system_lanes, such as: "system_lanes": [6,7]. And each value in system_tx_fir_pre2 matches the corresponding lane.
@byu343 could you fix the merge conflicts?
@byu343 could you fix the merge conflicts?
Done
@byu343 could you fix the merge conflicts?
Done
Reopen it
Tagging @arlakshm for awareness
@byu343 do ensure that during warm-reboot we are not setting these taps because it can cause the port to flap?
For the credo gearbox phys, I think warm-reboot support is not considered for now.
/Azp run Azure.sonic-swss
Azure Pipelines successfully started running 1 pipeline(s).
@Pterosaur @jimmyzhai Could please help to review this? Thanks.
@anamehra: Please tag Shyam/Arpit.
@anamehra: Please tag Shyam/Arpit.
@shyam77git
Couple of questions on this:
- Is adding the taps to the gearbox_config files mandatory or optional?
- Do you expect the SAI calls to be implemented in the platform mandatorily for these or are they optional?
Regards, Arpit
Couple of questions on this:
- Is adding the taps to the gearbox_config files mandatory or optional?
- Do you expect the SAI calls to be implemented in the platform mandatorily for these or are they optional?
Regards, Arpit
Hi Arpit, whether to provide those values in gearbox_config.json for any platform is optional. If orchagent finds the values from the gearbox_config.json, it will calls SAI implementation with the values; if it cannot, there is no calls to SAI for setting the tuning/tap values, so the tuning/tap support is not mandatory for the phy driver.
/Azp run Azure.sonic-swss
Azure Pipelines successfully started running 1 pipeline(s).
Hi @arpp93, @prgeor, can you approve this PR is no other comments?
/Azp run Azure.sonic-swss
Commenter does not have sufficient privileges for PR 2158 in repo sonic-net/sonic-swss
/Azpw run Azure.sonic-swss
/AzurePipelines run Azure.sonic-swss
Azure Pipelines successfully started running 1 pipeline(s).
Hi @jimmyzhai @arpp93 @prgeor, could you please review this again? Thanks.