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] Add ECMP support for vnet tunnel routes #1960

Merged
merged 4 commits into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions orchagent/nexthopkey.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,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 @@ -2335,3 +2335,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 @@ -205,6 +205,10 @@ class RouteOrch : public Orch, public Subject

unsigned int getNhgCount() { return m_nextHopGroupCount; }
unsigned int getMaxNhgCount() { return m_maxNextHopGroupCount; }

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

private:
SwitchOrch *m_switchOrch;
Expand Down
Loading