Skip to content

Commit

Permalink
Disable policy on ECMP nexthops
Browse files Browse the repository at this point in the history
To support requirement of ECMP without policy, disable policy on ECMP nexthops.
Also separate out ECMP NH test-cases and make them non-flaky. Also update these
UT to verify that policy is disabled for ECMP Nexthop

Change-Id: Ida1b7cf65ba6145031530effa4f442de11a41ff1
Closes-Bug: #1566650
  • Loading branch information
ashoksr committed Jun 3, 2016
1 parent bc19dd0 commit 3bcbc77
Show file tree
Hide file tree
Showing 7 changed files with 1,578 additions and 1,487 deletions.
2 changes: 1 addition & 1 deletion src/vnsw/agent/controller/controller_peer.cc
Expand Up @@ -718,7 +718,7 @@ void AgentXmppChannel::AddEcmpRoute(string vrf_name, IpAddress prefix_addr,

// Build the NH request and then create route data to be passed
DBRequest nh_req(DBRequest::DB_ENTRY_ADD_CHANGE);
nh_req.key.reset(new CompositeNHKey(Composite::ECMP, true,
nh_req.key.reset(new CompositeNHKey(Composite::ECMP, false,
comp_nh_list, vrf_name));
nh_req.data.reset(new CompositeNHData());
ControllerEcmpRoute *data =
Expand Down
6 changes: 3 additions & 3 deletions src/vnsw/agent/oper/inet_unicast_route.cc
Expand Up @@ -406,7 +406,7 @@ AgentPath *InetUnicastRouteEntry::AllocateEcmpPath(Agent *agent,
// It will also create CompositeNH if necessary
DBRequest nh_req(DBRequest::DB_ENTRY_ADD_CHANGE);
nh_req.key.reset(new CompositeNHKey(Composite::LOCAL_ECMP,
true, component_nh_list,
false, component_nh_list,
vrf()->GetName()));
nh_req.data.reset(new CompositeNHData());

Expand Down Expand Up @@ -687,7 +687,7 @@ void InetUnicastRouteEntry::AppendEcmpPath(Agent *agent,
// Form the request for Inet4UnicastEcmpRoute and invoke AddChangePath
DBRequest nh_req(DBRequest::DB_ENTRY_ADD_CHANGE);
nh_req.key.reset(new CompositeNHKey(Composite::LOCAL_ECMP,
true, component_nh_key_list,
false, component_nh_key_list,
vrf()->GetName()));
nh_req.data.reset(new CompositeNHData());

Expand Down Expand Up @@ -729,7 +729,7 @@ void InetUnicastRouteEntry::DeleteComponentNH(Agent *agent, AgentPath *path) {
// Form the request for Inet4UnicastEcmpRoute and invoke AddChangePath
DBRequest nh_req(DBRequest::DB_ENTRY_ADD_CHANGE);
nh_req.key.reset(new CompositeNHKey(Composite::LOCAL_ECMP,
true, component_nh_key_list,
false, component_nh_key_list,
vrf()->GetName()));
nh_req.data.reset(new CompositeNHData());

Expand Down
2 changes: 1 addition & 1 deletion src/vnsw/agent/oper/mpls.cc
Expand Up @@ -209,7 +209,7 @@ void MplsLabel::CreateEcmpLabel(const Agent *agent,
MplsLabelKey *key = new MplsLabelKey(MplsLabel::VPORT_NH, label);
req.key.reset(key);

MplsLabelData *data = new MplsLabelData(type, true, component_nh_key_list,
MplsLabelData *data = new MplsLabelData(type, false, component_nh_key_list,
vrf_name);
req.data.reset(data);

Expand Down
1 change: 1 addition & 0 deletions src/vnsw/agent/test/SConscript
Expand Up @@ -105,6 +105,7 @@ test_vhost_ip_change = AgentEnv.MakeTestCmd(env, 'test_vhost_ip_change',
flaky_agent_suite)
test_mirror = AgentEnv.MakeTestCmd(env, 'test_mirror', flaky_agent_suite)
test_nh = AgentEnv.MakeTestCmd(env, 'test_nh', flaky_agent_suite)
test_ecmp_nh = AgentEnv.MakeTestCmd(env, 'test_ecmp_nh', agent_suite)
test_dummy = AgentEnv.MakeTestCmd(env, 'test_dummy', flaky_agent_suite)
test_multicast = AgentEnv.MakeTestCmd(env, 'test_multicast', flaky_agent_suite)
test_xmpp_bcast_hv = AgentEnv.MakeTestCmd(env, 'test_xmpp_bcast_hv',
Expand Down

0 comments on commit 3bcbc77

Please sign in to comment.