Skip to content

Commit

Permalink
Custom monitoring based priority tunnels
Browse files Browse the repository at this point in the history
This PR implements the Vxlan ECMP priority tunnels where route next hop groups are switched based on the state of the next hop monitor session and their priority.
This implementation allows primary and secondary next-hop groups which are switched based on the monitor state of the next hops.
Please see the included tests to see what this code would do for detail.

Linked-PR: sonic-net/sonic-swss#2671 
Signed-off-by: siqbal1486 <shahzad.iqbal@microsoft.com>
  • Loading branch information
siqbal1986 authored Mar 31, 2023
1 parent 9d00e40 commit 0949cf8
Show file tree
Hide file tree
Showing 4 changed files with 1,504 additions and 147 deletions.
5 changes: 4 additions & 1 deletion orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ BfdOrch *gBfdOrch;
Srv6Orch *gSrv6Orch;
FlowCounterRouteOrch *gFlowCounterRouteOrch;
DebugCounterOrch *gDebugCounterOrch;
MonitorOrch *gMonitorOrch;

bool gIsNatSupported = false;
bool gSaiRedisLogRotate = false;
Expand Down Expand Up @@ -165,6 +166,8 @@ bool OrchDaemon::init()
gDirectory.set(vnet_rt_orch);
VRFOrch *vrf_orch = new VRFOrch(m_applDb, APP_VRF_TABLE_NAME, m_stateDb, STATE_VRF_OBJECT_TABLE_NAME);
gDirectory.set(vrf_orch);
gMonitorOrch = new MonitorOrch(m_stateDb, STATE_VNET_MONITOR_TABLE_NAME);
gDirectory.set(gMonitorOrch);

const vector<string> chassis_frontend_tables = {
CFG_PASS_THROUGH_ROUTE_TABLE_NAME,
Expand Down Expand Up @@ -353,7 +356,7 @@ bool OrchDaemon::init()
* when iterating ConsumerMap. This is ensured implicitly by the order of keys in ordered map.
* For cases when Orch has to process tables in specific order, like PortsOrch during warm start, it has to override Orch::doTask()
*/
m_orchList = { gSwitchOrch, gCrmOrch, gPortsOrch, gBufferOrch, gFlowCounterRouteOrch, gIntfsOrch, gNeighOrch, gNhgMapOrch, gNhgOrch, gCbfNhgOrch, gRouteOrch, gCoppOrch, gQosOrch, wm_orch, gPolicerOrch, tunnel_decap_orch, sflow_orch, gDebugCounterOrch, gMacsecOrch, gBfdOrch, gSrv6Orch, mux_orch, mux_cb_orch};
m_orchList = { gSwitchOrch, gCrmOrch, gPortsOrch, gBufferOrch, gFlowCounterRouteOrch, gIntfsOrch, gNeighOrch, gNhgMapOrch, gNhgOrch, gCbfNhgOrch, gRouteOrch, gCoppOrch, gQosOrch, wm_orch, gPolicerOrch, tunnel_decap_orch, sflow_orch, gDebugCounterOrch, gMacsecOrch, gBfdOrch, gSrv6Orch, mux_orch, mux_cb_orch, gMonitorOrch};

bool initialize_dtel = false;
if (platform == BFN_PLATFORM_SUBSTRING || platform == VS_PLATFORM_SUBSTRING)
Expand Down
Loading

0 comments on commit 0949cf8

Please sign in to comment.