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

[vnetorch] [vxlanorch] fix a set of memory usage issues #2352

Merged
merged 2 commits into from
Jun 29, 2022
Merged
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
3 changes: 2 additions & 1 deletion orchagent/vnetorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,8 @@ void VNetRouteOrch::delEndpointMonitor(const string& vnet, NextHopGroupKey& next
if (nexthop_info_[vnet].find(ip) != nexthop_info_[vnet].end()) {
if (--nexthop_info_[vnet][ip].ref_count == 0)
{
removeBfdSession(vnet, nhk, nexthop_info_[vnet][ip].monitor_addr);
IpAddress monitor_addr = nexthop_info_[vnet][ip].monitor_addr;
prsunny marked this conversation as resolved.
Show resolved Hide resolved
removeBfdSession(vnet, nhk, monitor_addr);
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion orchagent/vxlanorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1110,13 +1110,14 @@ void VxlanTunnel::updateRemoteEndPointIpRef(const std::string remote_vtep, bool
it->second.ip_refcnt++;
}
SWSS_LOG_DEBUG("Incrementing remote end point %s reference to %d", remote_vtep.c_str(),
it->second.ip_refcnt);
tnl_users_[remote_vtep].ip_refcnt);
}
else
{
if (it == tnl_users_.end())
{
SWSS_LOG_ERROR("Cannot decrement ref. End point not referenced %s", remote_vtep.c_str());
return;
}
it->second.ip_refcnt--;

Expand Down