[orchagent] Put port configuration to APPL_DB according to autoneg mode#1769
Merged
prsunny merged 1 commit intosonic-net:masterfrom Jul 7, 2021
Merged
[orchagent] Put port configuration to APPL_DB according to autoneg mode#1769prsunny merged 1 commit intosonic-net:masterfrom
prsunny merged 1 commit intosonic-net:masterfrom
Conversation
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
@jleveque , there is a build failure while downloading swss-common. Tracking it with build team. |
prsunny
reviewed
Jun 11, 2021
| attrs.insert(attrs.end(), autoneg_attrs.begin(), autoneg_attrs.end()); | ||
| attrs.insert(attrs.end(), force_attrs.begin(), force_attrs.end()); | ||
| } | ||
| p.set(key, attrs); |
Collaborator
There was a problem hiding this comment.
How is this handled during warmboot?
Collaborator
Author
There was a problem hiding this comment.
No special treatment for warmboot
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
Author
|
Hi @prsunny , it seems 2 test cases related to flex counter failed which should not relate to my change. Could you please help re-trigger the test? |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
@prsunny can you approve the PR so once the tests are passing we can merge? |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
@prsunny kindly reminder, can you please approve and merge? now that is is passing the tests. |
judyjoseph
pushed a commit
that referenced
this pull request
Aug 10, 2021
…de (#1769) *Before puting port related configuration to APPL_DB, check autoneg mode first. If autoneg mode is enabled, "speed" and "interface_type" will not be put into APPL_DB; if autoneg mode is disabled, "adv_speeds" and "adv_interface_types" will not be put into APPL_DB; else all configuration will be put to APPL_DB for backward compatible.
raphaelt-nvidia
pushed a commit
to raphaelt-nvidia/sonic-swss
that referenced
this pull request
Oct 5, 2021
…de (sonic-net#1769) *Before puting port related configuration to APPL_DB, check autoneg mode first. If autoneg mode is enabled, "speed" and "interface_type" will not be put into APPL_DB; if autoneg mode is disabled, "adv_speeds" and "adv_interface_types" will not be put into APPL_DB; else all configuration will be put to APPL_DB for backward compatible.
This was referenced Jan 20, 2022
prsunny
pushed a commit
that referenced
this pull request
Mar 1, 2022
* Put port operational speed to STATE DB * Remove previous workaround [orchagent] Put port configuration to APPL_DB according to autoneg mode #1769
judyjoseph
pushed a commit
that referenced
this pull request
Mar 7, 2022
* Put port operational speed to STATE DB * Remove previous workaround [orchagent] Put port configuration to APPL_DB according to autoneg mode #1769
preetham-singh
pushed a commit
to preetham-singh/sonic-swss
that referenced
this pull request
Aug 6, 2022
* Put port operational speed to STATE DB * Remove previous workaround [orchagent] Put port configuration to APPL_DB according to autoneg mode sonic-net#1769
Janetxxx
pushed a commit
to Janetxxx/sonic-swss
that referenced
this pull request
Nov 10, 2025
…de (sonic-net#1769) *Before puting port related configuration to APPL_DB, check autoneg mode first. If autoneg mode is enabled, "speed" and "interface_type" will not be put into APPL_DB; if autoneg mode is disabled, "adv_speeds" and "adv_interface_types" will not be put into APPL_DB; else all configuration will be put to APPL_DB for backward compatible.
Janetxxx
pushed a commit
to Janetxxx/sonic-swss
that referenced
this pull request
Nov 10, 2025
* Put port operational speed to STATE DB * Remove previous workaround [orchagent] Put port configuration to APPL_DB according to autoneg mode sonic-net#1769
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Before puting port related configuration to APPL_DB, check autoneg mode first. If autoneg mode is enabled, "speed" and "interface_type" will not be put into APPL_DB; if autoneg mode is disabled, "adv_speeds" and "adv_interface_types" will not be put into APPL_DB; else all configuration will be put to APPL_DB for backward compatible.
Why I did it
The field "speed" in PORT_TABLE of APPL_DB has two meanings:
This is all right when SONiC has no auto negotiation feature because the actual speed must equal to the configured speed or the operational status is down. However, with port auto negotiation feature, if autoneg mode is enabled, the actual speed could be a value of adv_speeds which might not equal to field "speed". Now port auto negotiation feature handle it this way:
For case#2, there is an issue. Think about following flow:
Step#3 won't affect the auto negotiation status because the autoneg mode is enabled, force interface type will not be applied to SAI. But it triggers PORT_TABLE change and portsyncd will push all Ethernet0 related configuration to APPL_DB. So, speed of Ethernet0 in "show interface status" changed to 400G.
This PR is to fix the issue.
How I verified it
Manual test
Details if related