5 #include <boost/uuid/uuid_io.hpp>
6 #include <boost/lexical_cast.hpp>
7 #include <boost/foreach.hpp>
12 #include <vnc_cfg_types.h>
13 #include <agent_types.h>
32 using namespace boost::asio;
40 FindActiveEntry(&key));
52 Path(), peer_(peer), nh_(NULL), label_(
MplsTable::kInvalidLabel),
53 vxlan_id_(
VxLanTable::kInvalidvxlan_id), dest_vn_list_(),
54 origin_vn_(
""), sync_(false), force_policy_(false), sg_list_(),
55 tunnel_dest_(0), tunnel_bmap_(
TunnelType::AllType()),
57 vrf_name_(
""), gw_ip_(), unresolved_(true),
58 is_subnet_discard_(false), dependant_rt_(rt), path_preference_(),
59 local_ecmp_mpls_label_(rt), composite_nh_key_(NULL), subnet_service_ip_(),
60 arp_mac_(), arp_interface_(NULL), arp_valid_(false),
61 ecmp_suppressed_(false), is_local_(false), is_health_check_service_(false),
62 peer_sequence_number_(0), etree_leaf_(false), layer2_control_word_(false),
63 inactive_(false), copy_local_path_(false), parent_rt_(rt), dependent_table_(NULL) {
175 if (
ChangeNH(agent, new_composite_nh)) {
215 LOG(DEBUG,
"Interface NH for <"
216 << boost::lexical_cast<std::string>(vm_port->
GetUuid())
217 <<
" : policy = " << policy);
259 *(label_tunnel_nh->
GetSip()),
260 *(label_tunnel_nh->
GetDip()),
264 nh_req.
key.reset(tnh_key);
269 *(label_tunnel_nh->
GetSip()),
281 nh_req.
key.reset(tnh_key);
319 bool comp_nh_policy =
false;
339 assert(table != NULL);
347 member->UpdateDependentRoute(NULL);
348 member->SetUnresolved(
true);
357 FindActiveEntry(nh_key));
360 member->UpdateDependentRoute(uc_rt);
361 member->SetUnresolved(
false);
369 bool path_unresolved =
false;
374 bool is_ecmp_member_resolved =
false;
376 bool comp_nh_policy =
false;
377 AgentPathEcmpComponentPtrList::const_iterator ecmp_member_it =
381 table->
FindRoute((*ecmp_member_it)->GetGwIpAddr());
384 (*ecmp_member_it)->UpdateDependentRoute(NULL);
385 (*ecmp_member_it)->SetUnresolved(
true);
386 if (!path_unresolved) {
387 path_unresolved =
true;
392 std::unique_ptr<const NextHopKey> nh_key_ptr(nh_key);
394 (*ecmp_member_it)->GetLabel(),
395 std::move(nh_key_ptr)));
396 comp_nh_list.push_back(component_nh_key);
399 is_ecmp_member_resolved =
true;
409 std::unique_ptr<const NextHopKey> nh_key_ptr(nh_key);
412 std::move(nh_key_ptr)));
413 comp_nh_list.push_back(component_nh_key);
415 (*ecmp_member_it)->UpdateDependentRoute(uc_rt);
416 (*ecmp_member_it)->SetUnresolved(
false);
426 bool new_comp_nh_policy =
false;
427 if ((is_ecmp_member_resolved ==
false) ||
465 bool comp_nh_policy =
false;
497 if (rt == sync_route) {
628 uint32_t ethernet_tag,
629 const std::string &parent) :
631 ip_addr_(ip_addr), ethernet_tag_(ethernet_tag),
638 if (r_evpn_path != NULL) {
640 return (ip_addr_ < r_evpn_path->
ip_addr());
653 evpn_rt->is_multicast(), 0),
654 ethernet_tag_(evpn_rt->ethernet_tag()), ip_addr_(evpn_rt->prefix_address()),
655 reference_path_(evpn_rt->GetActivePath()), ecmp_suppressed_(false) {
668 assert(evpn_peer != NULL);
677 assert(evpn_path != NULL);
681 if (evpn_path->
label() != label) {
687 if (evpn_path->
vxlan_id() != vxlan_id) {
718 if (evpn_path->
sg_list() != sg_list) {
724 if (evpn_path->
tag_list() != tag_list) {
758 assert(evpn_path != NULL);
782 if (path->
ChangeNH(agent, nh) ==
true)
879 if (path->
ChangeNH(agent, nh) ==
true)
890 dest_vn_list.insert(
vn_);
898 if (path->
ChangeNH(agent, nh) ==
true) {
964 mac = evpn_rt->
mac();
973 if (mac == vm_port->
vm_mac() && nh_dmac != vm_port->
vm_mac()) {
997 path_sg_list = path->
sg_list();
1047 bool old_policy =
false;
1048 bool new_policy =
false;
1051 if (nh && nh->PolicyEnabled())
1053 if (old_policy != new_policy) {
1070 if (path->
ChangeNH(agent, nh) ==
true)
1139 FindActiveEntry(&pbb_nh_key));
1147 path_sg_list = path->
sg_list();
1161 if (path->
ChangeNH(agent, nh) ==
true) {
1194 path_sg_list = path->
sg_list();
1223 if (path->
ChangeNH(agent, nh) ==
true) {
1265 if (path->
ChangeNH(agent, nh) ==
true)
1282 dest_vn_list.insert(
vn_);
1295 if (path->
ChangeNH(agent, nh) ==
true)
1319 fabric_label_(
MplsTable::kInvalidLabel) {
1351 for (ComponentNHKeyList::const_iterator it =
1357 static_cast<const TunnelNHKey *
>((*it)->nh_key());
1360 tunnel_nh_key->
dip().to_string()) !=
1362 new_component_nh_key_list.push_back(*it);
1368 new_component_nh_key_list,
1374 FindActiveEntry(nh_req.
key.get()));
1403 nh = multicast_path->
UpdateNH(agent, cnh, te);
1419 const std::string &vn_name,
1423 uint32_t tunnel_type,
1428 dest_vn_list.insert(vn_name);
1494 const std::string &dest_vn_name) :
1496 dest_vn_name_(dest_vn_name) {
1509 if (path->
ChangeNH(agent, nh) ==
true) {
1546 void UnresolvedNH::HandleRequest()
const {
1550 ErrorResp *resp =
new ErrorResp();
1551 resp->set_context(context());
1557 std::string empty(
"");
1560 NhListResp *resp =
new NhListResp();
1563 AgentRouteTable::UnresolvedNHTree::const_iterator it;
1570 resp->set_context(context()+
"$");
1573 resp =
new NhListResp();
1577 resp->set_context(context());
1587 rt_info.set_vrf(
vrf()->GetName());
1591 rt_info.set_op(
"ADD");
1596 rt_info.set_op(
"DELETE");
1605 rt_info.set_op(
"PATH ADD");
1607 rt_info.set_op(
"PATH CHANGE");
1609 rt_info.set_op(
"PATH DELETE");
1611 rt_info.set_op(
"PATH STALE");
1615 rt_info.set_nh_type(
"<NULL>");
1625 rt_info.set_nh_type(
"<NULL>");
1632 rt_info.set_nh_type(
"TUNNEL");
1633 rt_info.set_dest_server(tun->
GetDip()->to_string());
1639 rt_info.set_nh_type(
"DIRECT");
1644 rt_info.set_nh_type(
"DIRECT");
1650 rt_info.set_nh_type(
"INTERFACE");
1657 rt_info.set_nh_type(
"RECEIVE");
1663 rt_info.set_nh_type(
"DISCARD");
1668 rt_info.set_nh_type(
"VLAN");
1673 rt_info.set_nh_type(
"RESOLVE");
1678 rt_info.set_nh_type(
"COMPOSITE");
1683 rt_info.set_nh_type(
"L2_RECEIVE");
1688 const PBBNH *pbb_nh =
static_cast<const PBBNH *
>(nh);
1689 rt_info.set_nh_type(
"PBB");
1691 if (pbb_nh->
vrf()) {
1692 rt_info.set_dest_server_vrf(pbb_nh->
vrf()->
GetName());
1698 const VrfNH *vrf_nh =
static_cast<const VrfNH *
>(nh);
1699 rt_info.set_nh_type(
"VRF");
1714 for (VnListType::const_iterator vnit =
dest_vn_list().begin();
1716 vn_list->push_back(*vnit);
1725 pdata.set_peer(const_cast<Peer *>(
peer())->GetName());
1726 std::vector<std::string> vn_list;
1728 pdata.set_dest_vn_list(vn_list);
1730 pdata.set_unresolved(
unresolved() ?
"true" :
"false");
1732 if (!
gw_ip().is_unspecified()) {
1733 pdata.set_gw_ip(
gw_ip().to_string());
1738 pdata.set_ecmp_suppressed(
true);
1745 pdata.set_label(
label());
1747 const PBBNH *pbb_nh =
static_cast<const PBBNH *
>(nh);
1750 if (tun_nh != NULL) {
1755 pdata.set_active_tunnel_type(
1758 pdata.set_supported_tunnel_type(
1760 PathPreferenceSandeshData path_preference_data;
1765 path_preference_data.set_wait_for_traffic(
1769 std::ostringstream str;
1771 path_preference_data.set_dependent_ip(str.str());
1773 pdata.set_path_preference_data(path_preference_data);
1781 std::vector<std::string> string_vector;
1783 std::vector<std::string>::iterator string_vector_iter =
1784 string_vector.begin();
1785 std::stringstream ss;
1786 while (string_vector_iter != string_vector.end()) {
1787 ss << (*string_vector_iter);
1789 string_vector_iter++;
1791 pdata.set_ecmp_hashing_fields(ss.str());
1794 bool is_stale =
false;
1799 pdata.set_stale(is_stale);
1827 if (local_path == NULL) {
1834 std::unique_ptr<const NextHopKey> nh_key_p(nh_key->
Clone());
1845 comp_nh_list.push_back(new_comp_nh);
1853 bool &comp_nh_policy,
1863 if (component_nh_key.get() == NULL ||
1877 FindMplsLabel(component_nh_key->label());
1894 const NextHopKey *nh_key_1 = component_nh_key->nh_key();
1897 if (nh_key_1->
IsEqual(*nh_key_2) ==
false) {
1923 nh_req.
key.reset(composite_nh_key->
Clone());
1927 FindActiveEntry(composite_nh_key));
1931 FindActiveEntry(composite_nh_key));
1956 if (
peer_ == NULL) {
1960 return peer_->NexthopIp(agent,
this);
1964 AgentPath(peer, NULL), vm_interface_(NULL), flood_dhcp_(false) {
1977 const Peer *mac_vm_binding_peer =
1978 dynamic_cast<const Peer *
>(peer);
1979 assert(mac_vm_binding_peer != NULL);
1990 if (path->
ChangeNH(agent, nh) ==
true)
2012 FindActiveEntry(nh_req.
key.get()));
2020 FindActiveEntry(nh_req.
key.get()));
2036 if (!bridge_rt || rt->
vrf() == NULL) {
2051 AgentPath(peer, rt), routing_vrf_(routing_vrf) {
2093 const std::string& origin_vn):
2096 communities_(communities),
2097 path_preference_(path_preference),
2098 ecmp_load_balance_(ecmp_load_balance),
2099 tag_list_(tag_list),
2100 routing_vrf_(vrf_entry), vxlan_id_(vxlan_id),
2101 dest_vn_list_(vn_list),
2102 origin_vn_(origin_vn) {
2133 if (path->
ChangeNH(agent, nh) ==
true) {
2200 addr_(addr), label_(label), dependent_rt_(rt) {}
const std::string & GetName() const
VrfEntryConstRef routing_vrf_
MulticastRoutePath(const Peer *peer)
uint8_t prefix_length() const
!
InterfaceKey * Clone() const
uint32_t ethernet_tag() const
static const MacAddress & ZeroMac()
uint32_t const GetTransportLabel() const
boost::scoped_ptr< CompositeNHKey > composite_nh_key_
EvpnRoutingData(DBRequest &nh_req, const SecurityGroupList &sg_list, const CommunityList &communities, const PathPreference &path_preference, const EcmpLoadBalance &ecmp_load_balance, const TagList &tag_list, VrfEntryConstRef vrf_entry, uint32_t vxlan_id, const VnListType &vn_list, const std::string &origin_vn="")
AgentPath * FindLocalVmPortPath() const
const CommunityList communities_
const Interface * GetInterface() const
void set_path_preference(const PathPreference &rp)
uint32_t l3_vrf_vxlan_id_
virtual bool AddChangePathExtended(Agent *, AgentPath *, const AgentRoute *)
bool IsEqual(const NextHopKey &rhs) const
const VnListType & dest_vn_list() const
void set_vm_interface(const VmInterface *vm_interface)
std::string dest_vn_name_
void ReplaceLocalNexthop(const ComponentNHKeyList &new_comp_nh)
void set_communities(const CommunityList &communities)
void ResetEcmpHashFields()
const MacAddress & vm_mac() const
SecurityGroupList sg_list_
const VrfEntry * GetVrf() const
bool ChangeNH(Agent *agent, NextHop *nh)
bool ResyncSubnetRoutes(const InetUnicastRouteEntry *rt, bool val)
const Ip4Address & dip() const
TsnElector * tsn_elector() const
void set_unresolved(bool unresolved)
const Peer * local_vm_export_peer() const
static Agent * GetInstance()
static void Delete(const Peer *peer, const std::string &vrf_name, const MacAddress &mac, const IpAddress &ip_addr, uint32_t ethernet_tag)
bool learning_enabled() const
const TagList & tag_list() const
const PathPreference & path_preference() const
DependencyRef< AgentRoute, AgentRoute > dependant_rt_
const IpAddress subnet_service_ip() const
AgentRouteTable * GetEvpnRouteTable() const
void set_local_ecmp_mpls_label(MplsLabel *mpls)
const IpAddress & ip_addr() const
virtual AgentPath * CreateAgentPath(const Peer *peer, AgentRoute *rt) const
static std::string GetString(uint32_t type)
NextHop * l2_receive_nh() const
void set_original_nh(NextHopRef nh)
const boost::uuids::uuid & GetUuid() const
bool ChangeNH(NextHop *nh)
const VrfEntry * GetVrf() const
NextHopTable * nexthop_table() const
DBTableBase * get_table() const
virtual const NextHop * ComputeNextHop(Agent *agent) const
const MacAddress & GetMac() const
static void AddArpReq(const string &route_vrf_name, const Ip4Address &ip, const string &nh_vrf_name, const Interface *intf, bool policy, const VnListType &dest_vn_list, const SecurityGroupList &sg_list, const TagList &tag_list)
void ImportPrevActiveNH(Agent *agent, NextHop *nh)
void set_intf_route_type(const std::string &intf_route_type)
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
void set_routing_vrf(const VrfEntry *vrf)
DependencyRef< AgentRoute, MplsLabel > local_ecmp_mpls_label_
TunnelType::Type tunnel_type() const
UnresolvedNHTree::const_iterator unresolved_nh_end() const
Agent supports multiple route tables - Inet-unicast (IPv4/IPv6), Inet-multicast, bridge, EVPN (Type2/Type5). This base class contains common code for all types of route tables.
virtual bool UpdateRoute(AgentRoute *rt)
uint32_t preference() const
void set_sg_list(const SecurityGroupList &sg)
const Interface * vhost_interface() const
const std::string & intf_route_type() const
bool RebakeAllTunnelNHinCompositeNH(const AgentRoute *sync_route)
const Interface * GetInterface() const
const NextHop * nexthop() const
boost::asio::ip::address IpAddress
virtual bool PostChangeNH(Agent *agent, NextHop *nh)
void set_vxlan_id(uint32_t vxlan_id)
EcmpLoadBalance ecmp_load_balance_
uint32_t GetTunnelBmap() const
PathPreference path_preference_
boost::shared_ptr< AgentPathEcmpComponent > AgentPathEcmpComponentPtr
std::vector< int > SecurityGroupList
bool is_multicast() const
const MacAddress & GetMac() const
std::unique_ptr< DBRequestData > data
InetUnicastAgentRouteTable * fabric_inet4_mpls_table() const
std::string ToString() const
InterfaceKey * Clone() const
virtual bool CanDeletePath(Agent *agent, AgentPath *path, const AgentRoute *rt) const
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
UnresolvedNHTree::const_iterator unresolved_nh_begin() const
InetUnicastAgentRouteTable * GetInet4UnicastRouteTable() const
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
AgentDBEntry * FindActiveEntry(const DBEntry *key)
InterfaceTable * interface_table() const
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
const Ip4Address * GetDip() const
const VrfEntry * routing_vrf() const
static TypeBmap MplsType()
EvpnDerivedPath(const EvpnPeer *evpn_peer, const IpAddress &ip_addr, uint32_t ethernet_tag, const std::string &parent)
TunnelType::TypeBmap tunnel_bmap_
void set_native_vrf_id(uint32_t vrf_id)
InetUnicastRouteEntry * FindRoute(const IpAddress &ip)
EcmpHashFields ecmp_hash_fields_
void set_is_health_check_service(bool val)
boost::shared_ptr< const ComponentNHKey > ComponentNHKeyPtr
const string & GetName() const
VrfEntryConstRef routing_vrf_
const SecurityGroupList sg_list_
std::string dest_vn_name_
bool IsLess(const Peer *rhs) const
virtual bool IsLess(const AgentPath &right) const
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
virtual AgentPath * CreateAgentPath(const Peer *peer, AgentRoute *rt) const
EvpnRoutingPath(const Peer *peer, AgentRoute *rt, VrfEntryConstRef routing_vrf)
void set_is_local(bool is_local)
void set_vrf(const std::string &vrf)
const MplsLabel * local_ecmp_mpls_label() const
const std::string dest_vn_name_
MplsTable * mpls_table() const
std::unique_ptr< DBRequestKey > KeyPtr
bool ChangeCompositeNH(Agent *agent, CompositeNHKey *nh)
bool ReorderCompositeNH(Agent *agent, CompositeNHKey *nh, bool &comp_nh_policy, const AgentPath *local_path)
void SetNHSandeshData(NhSandeshData &data) const
void SetDynamicLearntRouteFlag(bool is_learnt_route)
bool is_health_check_service_
Base class for all Route entries in agent.
const VrfEntry * vrf() const
void Swap(DBRequest *rhs)
virtual bool CanDeletePath(Agent *agent, AgentPath *path, const AgentRoute *rt) const
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
virtual CompositeNHKey * Clone() const
CompositeNHKey * composite_nh_key()
static bool CopyPathParameters(Agent *agent, AgentPath *path, const std::string &dest_vn_name, bool unresolved, uint32_t vxlan_id, uint32_t label, uint32_t tunnel_type, NextHop *nh, const AgentRoute *rt, bool ha_stale=false)
virtual bool IsLess(const AgentPath &right) const
AgentPath(const Peer *peer, AgentRoute *rt)
virtual const AgentPath * UsablePath() const
uint64_t ChannelSequenceNumber() const
boost::scoped_ptr< const InterfaceKey > intf_key_
std::vector< ComponentNHKeyPtr > ComponentNHKeyList
std::string ToString() const
virtual bool UpdateRoute(AgentRoute *rt)
const Ip4Address & tunnel_dest() const
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
const Interface * GetInterface() const
TunnelType::Type const GetTransportTunnelType() const
NextHop::Type GetType() const
void GetStringVector(std::vector< std::string > &string_vector) const
TunnelType::TypeBmap tunnel_bmap_
const std::string & fabric_vrf_name() const
TunnelType::TypeBmap tunnel_bmap_
const Type GetType() const
bool layer2_control_word() const
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
void set_tunnel_bmap(TunnelType::TypeBmap bmap)
const AgentPath * GetActivePath() const
NextHop * nexthop() const
void FillTrace(RouteInfo &route, Trace event, const AgentPath *path) const
bool RebakeLabel(MplsTable *table, uint32_t label, NextHop *nh)
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
VrfEntry * FindVrfFromId(size_t index)
bool layer2_control_word() const
const ManagedPhysicalDevicesList & ManagedPhysicalDevices() const
SecurityGroupList sg_list_
virtual ~EvpnRoutingPath()
void set_dependent_ip(const IpAddress &ip)
static const uint32_t kInvalidvxlan_id
virtual bool UpdateRoute(AgentRoute *rt)
void set_arp_interface(const Interface *intf)
void set_ecmp_suppressed(bool suppresed)
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
const IpAddress & gw_ip() const
PathPreference & path_preference_non_const()
bool UpdateRouteFlags(bool ipam_subnet_route, bool ipam_host_route, bool proxy_arp)
MacVmBindingPath(const Peer *peer)
const std::string & vrf() const
const TunnelType & GetTunnelType() const
const NextHop * child_nh() const
void set_subnet_service_ip(const IpAddress &ip)
const NextHop * GetActiveNextHop() const
void set_layer2_control_word(bool layer2_control_word)
std::unique_ptr< DBRequestKey > key
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
EcmpLoadBalance ecmp_load_balance_
bool is_health_check_service() const
virtual AgentPath * CreateAgentPath(const Peer *peer, AgentRoute *rt) const
uint32_t native_vrf_id() const
static const std::string & NullString()
const Peer * peer() const
const VmInterface * vm_interface() const
EcmpHashFields & CompEcmpHashFields()
const Interface * GetInterface() const
const std::string & origin_vn() const
const Peer * local_peer() const
const bool unresolved() const
void set_preference(uint32_t preference)
const AgentPath * reference_path_
const std::string & vrf_name() const
NextHop * discard_nh() const
bool policy_enabled() const
const Ip4Address * GetSip() const
std::vector< std::string > CommunityList
void SetSandeshData(PathSandeshData &data) const
virtual bool PostChangeNH(Agent *agent, NextHop *nh)
COMPOSITETYPE composite_nh_type() const
AgentParam * params() const
COMPOSITETYPE composite_nh_type() const
uint64_t peer_sequence_number() const
std::set< std::string > VnListType
const VmInterface * vm_intf_
virtual KeyPtr GetDBRequestKey() const =0
const SecurityGroupList path_sg_list_
void set_tunnel_dest(const Ip4Address &tunnel_dest)
const MacAddress & mac() const
static Type ComputeType(TypeBmap bmap)
const std::string origin_vn_
virtual bool IsLess(const AgentPath &right) const
virtual bool UpdateRoute(AgentRoute *rt)
virtual bool CanDeletePath(Agent *agent, AgentPath *path, const AgentRoute *rt) const
virtual const PrefixType & prefix_address() const
Returns the value of a stored prefix address (IPv4, IPv6 or MAC address)
const MacAddress & rewrite_dmac() const
boost::asio::ip::address_v4 Ip4Address
virtual std::string ToString() const
EvpnPeer * evpn_peer() const
uint32_t GetActiveLabel() const
static const uint32_t kInvalidLabel
VrfTable * vrf_table() const
bool ResolveGwNextHops(Agent *agent, const AgentRoute *sync_route)
bool UpdateNHPolicy(Agent *agent)
virtual bool Sync(AgentRoute *sync_route)
void set_inactive(bool inactive)
AgentPathEcmpComponentPtrList ecmp_member_list_
std::string dest_vn_name_
virtual AgentPath * CreateAgentPath(const Peer *peer, AgentRoute *rt) const
const MacAddress & GetIpMac(const IpAddress &, const uint8_t plen) const
virtual const NextHop * ComputeNextHop(Agent *agent) const
const MacAddress & GetDMac() const
void UpdateEcmpHashFields(const Agent *agent, const EcmpLoadBalance &ecmp_load_balance, DBRequest &nh_req)
void set_tag_list(const TagList &tag)
void set_nexthop(NextHop *nh)
virtual std::string ToString() const =0
boost::scoped_ptr< InterfaceKey > intf_
void set_is_subnet_discard(bool discard)
CommunityList communities_
SecurityGroupList sg_list_
void RemoveUnresolvedRoute(const AgentRoute *rt)
void set_origin_vn(const std::string &origin_vn)
AgentPathEcmpComponent(IpAddress addr, uint32_t label, AgentRoute *rt)
void Process(DBRequest &req)
const VnListType dest_vn_list_
PathPreference path_preference_
virtual bool UpdateRoute(AgentRoute *rt)
void set_flood_dhcp(bool flood_dhcp)
bool dest_vn_match(const std::string &vn) const
void set_etree_leaf(bool leaf)
virtual bool UpdateRoute(AgentRoute *rt)
void DeleteEvpnType5Route(Agent *agent, const AgentRoute *rt) const
void set_arp_valid(bool valid)
void set_composite_nh_key(CompositeNHKey *key)
VrfEntry * forwarding_vrf() const
virtual bool flood_dhcp() const
bool Reorder(Agent *agent, uint32_t label, const NextHop *nh)
AgentRoute * GetParentRoute()
#define LOG(_Level, _Msg)
EvpnDerivedPathData(const EvpnRouteEntry *evpn_rt)
CompositeNH * ChangeTunnelType(Agent *agent, TunnelType::Type type) const
MplsLabel * FindMplsLabel(uint32_t label)
uint32_t vxlan_id() const
bool ecmp_suppressed() const
void set_label(uint32_t label)
void set_arp_mac(const MacAddress &mac)
const std::string & name() const
const Interface * get_interface() const
const Peer * local_vm_peer() const
static const MacAddress & pkt_interface_mac()
const Ip4Address * NexthopIp(Agent *agent) const
bool UpdateTunnelType(Agent *agent, const AgentRoute *sync_route)
bool PolicyEnabled() const
void set_dest_vn_list(const VnListType &dest_vn_list)
DBRequest composite_nh_req_
virtual const NextHop * ComputeNextHop(Agent *agent) const
bool wait_for_traffic() const
IpamSubnetRoute(DBRequest &nh_req, const std::string &dest_vn_name)
bool ConfigChanged(const PathPreference &rhs) const
PathPreference path_preference_
AgentMode agent_mode() const
void SetPolicy(bool policy)
bool subnet_hosts_resolvable() const
const Peer * fabric_rt_export_peer() const
DBTablePartBase * get_table_partition() const
const PathPreference path_preference_
PathPreference path_preference_
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
const IpAddress & dependent_ip() const
virtual std::string ToString() const
void Notify(DBEntryBase *entry)
const VrfEntry * vrf() const
bool ResyncControlWord(const AgentRoute *rt)
uint32_t ethernet_tag() const
uint32_t tunnel_bmap() const
void reset(ObjectType *ptr)
bool mac_ip_learning_enable() const
void set_delete_on_zero_refcount(bool val)
const Interface * arp_interface() const
void set_tunnel_type(TunnelType::Type type)
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
const CommunityList & communities() const
const ComponentNHKeyList & component_nh_key_list() const
void set_force_policy(bool force_policy)
const PathPreference path_preference_
const EcmpLoadBalance ecmp_load_balance_
bool DBEntrySandesh(Sandesh *sresp, std::string &name) const
const Ip4Address * router_ip_ptr() const
IpAddress subnet_service_ip_
virtual NextHopKey * Clone() const =0
virtual bool AddChangePathExtended(Agent *agent, AgentPath *path, const AgentRoute *rt)
InterfaceKey * Clone() const
uint32_t sequence() const
static TypeBmap VxlanType()
void GetDestinationVnList(std::vector< std::string > *vn_list) const
const MacAddress dest_bmac() const
const IpAddress & ip_addr() const
TunnelType::Type tunnel_type_
const SecurityGroupList & sg_list() const
uint32_t vxlan_id() const
SecurityGroupList sg_list_
const EcmpLoadBalance & ecmp_load_balance() const
const std::string & intf_route_type() const
virtual Agent::RouteTableType GetTableType() const =0
void CalculateChangeInEcmpFields(const EcmpLoadBalance &ecmp_load_balance, EcmpHashFields &ecmp_hash_fields)
void set_ecmp_load_balance(const EcmpLoadBalance &ecmp_load_balance)
NextHop * UpdateNH(Agent *agent, CompositeNH *cnh, const TsnElector *te)
void CopyLocalPath(CompositeNHKey *composite_nh_key, const AgentPath *local_path)
void SyncRoute(bool sync)
std::vector< int > TagList
const ComponentNHKeyList & component_nh_key_list() const
MacAddress arp_mac() const