sonic-swss icon indicating copy to clipboard operation
sonic-swss copied to clipboard

[gearbox] Support setting tx taps on gearbox ports

Open byu343 opened this issue 3 years ago • 19 comments

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 avatar Feb 24 '22 23:02 byu343

@byu343 do ensure that during warm-reboot we are not setting these taps because it can cause the port to flap?

prgeor avatar Feb 25 '22 13:02 prgeor

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?

prgeor avatar Feb 25 '22 13:02 prgeor

@Pterosaur @jimmyzhai please review

prgeor avatar Feb 25 '22 14:02 prgeor

@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 avatar Feb 26 '22 00:02 byu343

@byu343 could you fix the merge conflicts?

prgeor avatar Apr 13 '22 05:04 prgeor

@byu343 could you fix the merge conflicts?

Done

byu343 avatar Apr 15 '22 00:04 byu343

@byu343 could you fix the merge conflicts?

Done

Reopen it

byu343 avatar Apr 15 '22 00:04 byu343

Tagging @arlakshm for awareness

kenneth-arista avatar May 09 '22 22:05 kenneth-arista

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

byu343 avatar May 10 '22 17:05 byu343

/Azp run Azure.sonic-swss

arlakshm avatar May 13 '22 02:05 arlakshm

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar May 13 '22 02:05 azure-pipelines[bot]

@Pterosaur @jimmyzhai Could please help to review this? Thanks.

byu343 avatar Jul 19 '22 01:07 byu343

@anamehra: Please tag Shyam/Arpit.

abdosi avatar Sep 20 '22 14:09 abdosi

@anamehra: Please tag Shyam/Arpit.

@shyam77git

anamehra avatar Sep 20 '22 15:09 anamehra

Couple of questions on this:

  1. Is adding the taps to the gearbox_config files mandatory or optional?
  2. Do you expect the SAI calls to be implemented in the platform mandatorily for these or are they optional?

Regards, Arpit

arpp93 avatar Sep 20 '22 18:09 arpp93

Couple of questions on this:

  1. Is adding the taps to the gearbox_config files mandatory or optional?
  2. 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.

byu343 avatar Sep 20 '22 18:09 byu343

/Azp run Azure.sonic-swss

arlakshm avatar Oct 10 '22 20:10 arlakshm

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Oct 10 '22 20:10 azure-pipelines[bot]

Hi @arpp93, @prgeor, can you approve this PR is no other comments?

arlakshm avatar Oct 10 '22 20:10 arlakshm

/Azp run Azure.sonic-swss

byu343 avatar Oct 25 '22 16:10 byu343

Commenter does not have sufficient privileges for PR 2158 in repo sonic-net/sonic-swss

azure-pipelines[bot] avatar Oct 25 '22 16:10 azure-pipelines[bot]

/Azpw run Azure.sonic-swss

byu343 avatar Oct 28 '22 23:10 byu343

/AzurePipelines run Azure.sonic-swss

mssonicbld avatar Oct 28 '22 23:10 mssonicbld

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Oct 28 '22 23:10 azure-pipelines[bot]

Hi @jimmyzhai @arpp93 @prgeor, could you please review this again? Thanks.

byu343 avatar Nov 15 '22 18:11 byu343