-
Notifications
You must be signed in to change notification settings - Fork 539
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
[portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it #2333
Conversation
vstest failure is under investigation. |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
@bingwang-ms
|
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
5db9249
to
944d3ad
Compare
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
None of the failures is caused by the PR itself. Retried
|
failure is tracked by issue #2365 |
Failure is not related to PR. Retried.
|
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
…FEC mode is supported before setting it <!-- Please make sure you have read and understood the contribution guildlines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md 1. Make sure your commit includes a signature generted with `git commit -s` 2. Make sure your commit title follows the correct format: [component]: description 3. Make sure your commit message contains enough details about the change and related tests 4. Make sure your pull request adds related reviewers, asignees, labels Please also provide the following information in this pull request: --> **What I did** Expose supported FEC modes to `STATE_DB.PORT_TABLE|<port>.supported_fecs`. The orchagent calls `get_port_attribute` to get attribute `SAI_PORT_ATTR_SUPPORTED_FEC_MODE` during initialization and then records it into internal data. - By default, the supported FEC modes will be returned by SAI and exposed to `STATE_DB`. Eg. `rs,none` means only `rs` and `none` is supported on the port. - The orchagent will check whether the FEC mode is supported on the port before calling the SAI API to set it. - The CLI will check whether the FEC mode is in `supported_fecs` before setting FEC mode on a port to the `CONFIG_DB` - In case the SAI API does not support any FEC mode on the port, `N/A` will be exposed to `STATE_DB` - The orchagent will deny any FEC setting and prints log. - The CLI will deny FEC setting. - In case the SAI API `get_port_attribute` returns `Not implemented` - No check will be performed before setting a FEC mode to SAI on the port. - The CLI will check whether the FEC mode is defined before setting it to `CONFIG_DB`. **Why I did it** It is not supported to set FEC mode on some platforms. To avoid error, we need to expose the supported FEC list. **How I verified it** Manually test and mock test. **Details if related**
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
…d check whether FEC mode is supported before setting it (sonic-net#2333)" (sonic-net#2396)" This reverts commit 6565b50.
@stephenxs this change is an empty cherry-pick for 202205. Can you double check? |
Thanks @yxieca. |
…d check whether FEC mode is supported before setting it (sonic-net#2333)" (sonic-net#2396)" This reverts commit 6565b50.
…FEC mode is supported before setting it (sonic-net#2333) - What I did Expose supported FEC modes to STATE_DB.PORT_TABLE|<port>.supported_fecs. The orchagent calls get_port_attribute to get attribute SAI_PORT_ATTR_SUPPORTED_FEC_MODE during initialization and then records it into internal data. 1. By default, the supported FEC modes will be returned by SAI and exposed to STATE_DB. Eg. rs,none means only rs and none is supported on the port. The orchagent will check whether the FEC mode is supported on the port before calling the SAI API to set it. The CLI will check whether the FEC mode is in supported_fecs before setting FEC mode on a port to the CONFIG_DB 2. In case the SAI API does not support any FEC mode on the port, N/A will be exposed to STATE_DB The orchagent will deny any FEC setting and prints log. The CLI will deny FEC setting. 3. In case the SAI API get_port_attribute returns Not implemented No check will be performed before setting a FEC mode to SAI on the port. The CLI will check whether the FEC mode is defined before setting it to CONFIG_DB. - Why I did it It is not supported to set FEC mode on some platforms. To avoid error, we need to expose the supported FEC list. - How I verified it Manually test and mock test.
…whether FEC mode is supported before setting it (sonic-net#2333)" (sonic-net#2396) This reverts commit dc8bc1c. *Revert "[portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it"
…FEC mode is supported before setting it (#2400) * Revert "Revert "[portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (#2333)" (#2396)" This reverts commit 6565b50. * Adjust the prototype of setPortFec Signed-off-by: Stephen Sun <stephens@nvidia.com>
…FEC mode is supported before setting it (#2400) * Revert "Revert "[portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (#2333)" (#2396)" This reverts commit 6565b50. * Adjust the prototype of setPortFec Signed-off-by: Stephen Sun <stephens@nvidia.com>
What I did
Expose supported FEC modes to
STATE_DB.PORT_TABLE|<port>.supported_fecs
.The orchagent calls
get_port_attribute
to get attributeSAI_PORT_ATTR_SUPPORTED_FEC_MODE
during initialization and then records it into internal data.STATE_DB
. Eg.rs,none
means onlyrs
andnone
is supported on the port.supported_fecs
before setting FEC mode on a port to theCONFIG_DB
N/A
will be exposed toSTATE_DB
get_port_attribute
returnsNot implemented
CONFIG_DB
.Why I did it
It is not supported to set FEC mode on some platforms. To avoid error, we need to expose the supported FEC list.
How I verified it
Manually test and mock test.
Details if related