Populate existing interface cache, bring down before configDone#491
Merged
lguohan merged 4 commits intosonic-net:masterfrom May 1, 2018
Merged
Populate existing interface cache, bring down before configDone#491lguohan merged 4 commits intosonic-net:masterfrom
lguohan merged 4 commits intosonic-net:masterfrom
Conversation
lguohan
reviewed
May 1, 2018
portsyncd/linksync.cpp
Outdated
| } | ||
| catch (...) | ||
| { | ||
| // Ignore error in this flow ; |
lguohan
reviewed
May 1, 2018
portsyncd/linksync.cpp
Outdated
|
|
||
| //Bring down the existing kernel interfaces before notifying ConfigDone | ||
| string cmd, res; | ||
| cout << "Executing ip link set " << key << " down - ifindex " << idx_p->if_index << endl; |
Signed-off-by: Guohan Lu <[email protected]>
Contributor
|
Signed-off-by: Guohan Lu <[email protected]>
lguohan
approved these changes
May 1, 2018
lguohan
pushed a commit
that referenced
this pull request
May 1, 2018
* Populate existing interface cache, bring down before configDone * simplify the logic and add logging Signed-off-by: Guohan Lu <[email protected]> * add logging for publish event to state db Signed-off-by: Guohan Lu <[email protected]>
oleksandrivantsiv
pushed a commit
to oleksandrivantsiv/sonic-swss
that referenced
this pull request
Mar 1, 2023
Janetxxx
pushed a commit
to Janetxxx/sonic-swss
that referenced
this pull request
Nov 10, 2025
…c-net#491) * Populate existing interface cache, bring down before configDone * simplify the logic and add logging Signed-off-by: Guohan Lu <[email protected]> * add logging for publish event to state db Signed-off-by: Guohan Lu <[email protected]>
Janetxxx
pushed a commit
to Janetxxx/sonic-swss
that referenced
this pull request
Nov 10, 2025
…c-net#491) * Populate existing interface cache, bring down before configDone * simplify the logic and add logging Signed-off-by: Guohan Lu <[email protected]> * add logging for publish event to state db Signed-off-by: Guohan Lu <[email protected]>
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
During swss initialization, iterate through the existing kernel interfaces and populate cache. Also bring down the old interfaces during initialization
Why I did it
During swss initialization (swss restart, load minigraph), it was observed that sometimes Netlink messages are generated for old kernel interfaces which incorrectly results in populating the state_db and notifying subscribers as interface create. By having the old interface cache, this Netlink messages could be ignored.
How I verified it
Do config load_minigraph, service swss restart and verify logs
Details if related
The following logs are meant to show the
ifindexesandtimestampson when it is added tostate_db