Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions intfsyncd/intfsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ void IntfSync::onMsg(int nlmsg_type, struct nl_object *obj)
return;

key = LinkCache::getInstance().ifindexToName(rtnl_addr_get_ifindex(addr));

/* Don't sync lo, eth0, and docker0 routes */
if (key == "lo" || key == "eth0" || key == "docker0")
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

these are hardcoded values. Can you check if the key in the your front panel port list? That's more generic. as in some platform they may have other interfaces such as eth1, ... etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then we need to get the list of ports, lags and vlans during the runtime. For now hard coded values can solve the issue but later we might have to discuss about what approach is better.

Copy link
Contributor

Choose a reason for hiding this comment

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

for interface sync, we need to get lo address into the swss. This is becasue we are putting bgp loopback IP address on interface lo, and this one needs to be in the ASIC in order to trap all IP packets destined to bgp loopback address.


In reply to: 65829595 [](ancestors = 65829595)

Copy link
Contributor

Choose a reason for hiding this comment

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

why not pass them the swss and let the orch agent to figure out? In our design, the apps are independent probably not a good place to figure out the list of ports, lags and vlans during the runtime.


In reply to: 65829595 [](ancestors = 65829595)


key+= ":";
nl_addr2str(rtnl_addr_get_local(addr), addrStr, MAX_ADDR_SIZE);
key+= addrStr;
Expand Down
5 changes: 5 additions & 0 deletions neighsyncd/neighsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ void NeighSync::onMsg(int nlmsg_type, struct nl_object *obj)
return;

key+= LinkCache::getInstance().ifindexToName(rtnl_neigh_get_ifindex(neigh));

/* Don't sync lo, eth0, and docker0 neighbors */
if (key == "lo" || key == "eth0" || key == "docker0")
return;

key+= ":";
nl_addr2str(rtnl_neigh_get_dst(neigh), addrStr, MAX_ADDR_SIZE);
key+= addrStr;
Expand Down