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

[portsorch] Don't flap port when setting speed if port is down #764

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

stepanblyschak
Copy link
Contributor

@stepanblyschak stepanblyschak commented Jan 21, 2019

What I did
When port is already down during speed configuration don't put port down again.
Cache admin status in Port structure, do not set admin port status again if already set.

Why I did it
Avoid unnessesary SAI calls. It also had implications on Mellanox fastfast boot solution causing port flapping.

How I verified it
Currently VS fails (Check sonic-net/sonic-sairedis#419)
Verified it is passing all VS tests.
Mannual testing.

Details if related

orchagent/portsorch.cpp Outdated Show resolved Hide resolved
orchagent/portsorch.cpp Outdated Show resolved Hide resolved
orchagent/portsorch.cpp Show resolved Hide resolved
@stepanblyschak
Copy link
Contributor Author

retest this please

1 similar comment
@lguohan
Copy link
Contributor

lguohan commented Feb 2, 2019

retest this please

 - Cache port admin status and speed in port structure in
   initializePort();
 - Don't flap port if port is already down during speed set;
 - Don't set admin status if desired status is already set;
 - Set admin status as last step in doPortTask()

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
@stepanblyschak
Copy link
Contributor Author

retest this please

@liat-grozovik
Copy link
Collaborator

@prsunny , @yxieca this PR requires for Mellanox new SAI implementation. Please provide your feedback so we can merge this one and will be able to have new SAI with additional features required by SONiC.

@yxieca yxieca merged commit 7cf55ff into sonic-net:master Feb 20, 2019
@yxieca
Copy link
Contributor

yxieca commented Feb 21, 2019

Made to 201811 branch on 2/21/2019

yxieca pushed a commit that referenced this pull request Feb 21, 2019
- Cache port admin status and speed in port structure in
   initializePort();
 - Don't flap port if port is already down during speed set;
 - Don't set admin status if desired status is already set;
 - Set admin status as last step in doPortTask()

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
Signed-off-by:yangshiping@jd.com
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
…riority (sonic-net#764)

* [syncd] Add best candidate finder based on attr label

* [meta] Support chardata attr value on set validation

* [tests] Add unittests for lag label attribute comparison logic

* [tests] Add no lag label to lag label unittests

* [tests] Export color function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants