fpmsyncd: Re-allocating link cache when interface name cannot be resolved#61
Merged
stcheng merged 3 commits intosonic-net:masterfrom Sep 2, 2016
Merged
fpmsyncd: Re-allocating link cache when interface name cannot be resolved#61stcheng merged 3 commits intosonic-net:masterfrom
stcheng merged 3 commits intosonic-net:masterfrom
Conversation
- This happens when the host interfaces change and then we need to update the link cache.
fpmsyncd/routesync.cpp
Outdated
| { | ||
| rtnl_link_alloc_cache(m_nl_sock, AF_UNSPEC, &m_link_cache); | ||
| } | ||
| ifindexes += addrStr; |
Contributor
There was a problem hiding this comment.
ifindexes rename to ifnames
addrStr rename to ifname
Contributor
Author
|
Updated. |
fpmsyncd/routesync.cpp
Outdated
| if (!strlen(ifname)) | ||
| { | ||
| rtnl_link_alloc_cache(m_nl_sock, AF_UNSPEC, &m_link_cache); | ||
| rtnl_link_i2name(m_link_cache, ifindex, ifname, MAX_ADDR_SIZE); |
Contributor
There was a problem hiding this comment.
could the ifname still not get resolved even after updating the cache?
should we throw exception or print here if it happens?
Contributor
Author
There was a problem hiding this comment.
the ifname is currently only used as information. the orchagent doesn't depend on this value. i think for here, if the ifname cannot be resolved after updating the cache, we could just add "unknown" here.
Contributor
Author
|
🆙 |
Contributor
|
Ack |
stcheng
added a commit
that referenced
this pull request
Sep 2, 2016
…lved (#61) - This happens when the host interfaces change and then we need to update the link cache. - Renaming variables - Removing unnecessary m_link_cache check
lukasstockner
pushed a commit
to genesiscloud/sonic-swss
that referenced
this pull request
Apr 2, 2023
DavidZagury
pushed a commit
to DavidZagury/sonic-swss
that referenced
this pull request
Apr 28, 2025
…nic-net#61) ```<br>* 6fa42f08 - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-swss into 202412 (2025-03-15) [Sonic Automation] * 19ad393 - (origin/202411) Initialize Port oper error status map only once (sonic-net#3545) (2025-03-05) [mssonicbld] * 5c36279 - [copp]: Use non-zero trap priority for default trap group (sonic-net#3544) (2025-03-04) [mssonicbld]<br>```
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.
the link cache.