Skip to content

Commit

Permalink
ADD support for overlay ecmp
Browse files Browse the repository at this point in the history
  • Loading branch information
Shi Su committed Oct 14, 2021
1 parent 86b4ede commit a1fe93c
Show file tree
Hide file tree
Showing 6 changed files with 626 additions and 58 deletions.
2 changes: 2 additions & 0 deletions orchagent/nexthopkey.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ struct NextHopKey
weight = 0;
}

NextHopKey(const IpAddress &ip, const MacAddress &mac, const uint32_t &vni, bool overlay_nh) : ip_address(ip), alias(""), vni(vni), mac_address(mac){}

const std::string to_string() const
{
std::string str = formatMplsNextHop();
Expand Down
15 changes: 15 additions & 0 deletions orchagent/routeorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2150,3 +2150,18 @@ bool RouteOrch::removeOverlayNextHops(sai_object_id_t vrf_id, const NextHopGroup

return true;
}

void RouteOrch::increaseNextHopGroupCount()
{
m_nextHopGroupCount ++;
}

void RouteOrch::decreaseNextHopGroupCount()
{
m_nextHopGroupCount --;
}

bool RouteOrch::checkNextHopGroupCount()
{
return m_nextHopGroupCount < m_maxNextHopGroupCount;
}
4 changes: 4 additions & 0 deletions orchagent/routeorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ class RouteOrch : public Orch, public Subject
void delLinkLocalRouteToMe(sai_object_id_t vrf_id, IpPrefix linklocal_prefix);
std::string getLinkLocalEui64Addr(void);

void increaseNextHopGroupCount();
void decreaseNextHopGroupCount();
bool checkNextHopGroupCount();

private:
SwitchOrch *m_switchOrch;
NeighOrch *m_neighOrch;
Expand Down
Loading

0 comments on commit a1fe93c

Please sign in to comment.