Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
Junchao-Mellanox committed Jan 10, 2022
1 parent 607329f commit c92fe8b
Show file tree
Hide file tree
Showing 6 changed files with 312 additions and 194 deletions.
4 changes: 4 additions & 0 deletions orchagent/intfsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,8 @@ void IntfsOrch::addIp2MeRoute(sai_object_id_t vrf_id, const IpPrefix &ip_prefix)
{
gCrmOrch->incCrmResUsedCounter(CrmResourceType::CRM_IPV6_ROUTE);
}
IpPrefix prefix = ip_prefix.getIp().to_string();
gRouteOrch->onAddOtherRouteEntry(vrf_id, prefix);
}

void IntfsOrch::removeIp2MeRoute(sai_object_id_t vrf_id, const IpPrefix &ip_prefix)
Expand Down Expand Up @@ -1301,6 +1303,8 @@ void IntfsOrch::removeIp2MeRoute(sai_object_id_t vrf_id, const IpPrefix &ip_pref
{
gCrmOrch->decCrmResUsedCounter(CrmResourceType::CRM_IPV6_ROUTE);
}
IpPrefix prefix = ip_prefix.getIp().to_string();
gRouteOrch->onRemoveOtherRouteEntry(vrf_id, prefix);
}

void IntfsOrch::addDirectedBroadcast(const Port &port, const IpPrefix &ip_prefix)
Expand Down
4 changes: 4 additions & 0 deletions orchagent/muxorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ static sai_status_t create_route(IpPrefix &pfx, sai_object_id_t nh)
gCrmOrch->incCrmResUsedCounter(CrmResourceType::CRM_IPV6_ROUTE);
}

gRouteOrch->onAddOtherRouteEntry(gVirtualRouterId, pfx.getSubnet());

SWSS_LOG_NOTICE("Created tunnel route to %s ", pfx.to_string().c_str());
return status;
}
Expand Down Expand Up @@ -158,6 +160,8 @@ static sai_status_t remove_route(IpPrefix &pfx)
gCrmOrch->decCrmResUsedCounter(CrmResourceType::CRM_IPV6_ROUTE);
}

gRouteOrch->onRemoveOtherRouteEntry(gVirtualRouterId, pfx.getSubnet());

SWSS_LOG_NOTICE("Removed tunnel route to %s ", pfx.to_string().c_str());
return status;
}
Expand Down
Loading

0 comments on commit c92fe8b

Please sign in to comment.