Description
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
Activity