Skip to content
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

[SONIC-SWSS][PORT] inconsistent behavior between combine and separate port configuration deployment #21959

Open
yuazhe opened this issue Mar 7, 2025 · 1 comment
Assignees
Labels
Bug 🐛 Issue for 202411 Triaged this issue has been triaged

Comments

@yuazhe
Copy link
Contributor

yuazhe commented Mar 7, 2025

Below flow will generate an invalid auto negotiation configuration scenario, in this case sometime the port will never be up again

sudo config interface type Ethernet4 none
sudo config interface speed Ethernet4 1000
sudo config interface type Ethernet4 CR
sudo config interface advertised-speeds Ethernet4 all
sudo config interface advertised-types Ethernet4 CR,CR2,CR4
sudo config interface shutdown Ethernet4
sudo config interface startup Ethernet4

sudo config interface type Ethernet8 none
sudo config interface speed Ethernet8 1000
sudo config interface type Ethernet8 CR
sudo config interface advertised-speeds Ethernet8 1000
sudo config interface advertised-types Ethernet8 CR4
sudo config interface shutdown Ethernet8
sudo config interface startup Ethernet8

sudo config interface autoneg Ethernet8 enabled

It could been seen from swss.rec that in enable autoneg command, there could be 2 possible configuration deployment ways.
This is because https://github.com/sonic-net/sonic-swss/blob/4eb74f0082f0f8c4537fe58621ac902c870d217c/cfgmgr/portmgr.cpp#L206
could be ran either before or together with https://github.com/sonic-net/sonic-swss/blob/4eb74f0082f0f8c4537fe58621ac902c870d217c/cfgmgr/portmgr.cpp#L230
which can't be controlled.

2025-03-07.08:42:55.688322|PORT_TABLE:Ethernet8|SET|alias:etp3|index:3|lanes:16,17,18,19|speed:1000|interface_type:CR|adv_speeds:1000|adv_interface_types:CR4|autoneg:on
2025-03-07.08:42:55.702949|PORT_TABLE:Ethernet8|SET|mtu:9100|admin_status:up

and

2025-03-01.06:58:48.579256|PORT_TABLE:Ethernet8|SET|alias:etp3|index:3|lanes:16,17,18,19|speed:1000|autoneg:on|interface_type:CR|adv_speeds:1000|adv_interface_types:CR4|mtu:9100|admin_status:up

The first one will always keep the port up, but the second one will always keep the port down because during autoneg it will fail and directly continue without any fallback mechanism
https://github.com/sonic-net/sonic-swss/blob/4eb74f0082f0f8c4537fe58621ac902c870d217c/orchagent/portsorch.cpp#L4085-L4100

@dgsudharsan
Copy link
Collaborator

@liuh-80 Can you please help investigate this issue? @qiluo-msft for visibility.

@arlakshm arlakshm added the Triaged this issue has been triaged label Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Issue for 202411 Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

6 participants