Skip to content

fpmsyncd: Re-allocating link cache when interface name cannot be resolved#61

Merged
stcheng merged 3 commits intosonic-net:masterfrom
stcheng:fpm
Sep 2, 2016
Merged

fpmsyncd: Re-allocating link cache when interface name cannot be resolved#61
stcheng merged 3 commits intosonic-net:masterfrom
stcheng:fpm

Conversation

@stcheng
Copy link
Contributor

@stcheng stcheng commented Aug 31, 2016

  • This happens when the host interfaces change and then we need to update
    the link cache.

- This happens when the host interfaces change and then we need to update
  the link cache.
{
rtnl_link_alloc_cache(m_nl_sock, AF_UNSPEC, &m_link_cache);
}
ifindexes += addrStr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ifindexes rename to ifnames

addrStr rename to ifname

@stcheng
Copy link
Contributor Author

stcheng commented Sep 2, 2016

Updated.

@stcheng stcheng changed the title fpmsyncd: Re-allocate link cache when interface name cannot be resolved fpmsyncd: Re-allocating link cache when interface name cannot be resolved Sep 2, 2016
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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could the ifname still not get resolved even after updating the cache?
should we throw exception or print here if it happens?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stcheng
Copy link
Contributor Author

stcheng commented Sep 2, 2016

🆙

@lguohan
Copy link
Contributor

lguohan commented Sep 2, 2016

Ack

@stcheng stcheng merged commit be6d11d into sonic-net:master Sep 2, 2016
@stcheng stcheng deleted the fpm branch September 2, 2016 21:24
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>```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants