OpenSDN source code
VxlanRoutingManager Class Reference

This class manages an operative state of VxLAN logical routers (LR) defined via Config logical-router element. The operative state include bonds between LRs, virtual networks, VRFs and corresponding routes which support connectivity between networks connected to a LR. More...

#include <vxlan_routing_manager.h>

Collaboration diagram for VxlanRoutingManager:

Public Member Functions

 VxlanRoutingManager (Agent *agent)
 Constructs instance of the class and links to the Agent class instance. Since only one agent class instance works per system process, this implies that only one instance of VxlanRoutingManager exists. More...
 
virtual ~VxlanRoutingManager ()
 Destroys the VxlanRoutingManager instance. More...
 
void Register ()
 Registers handlers for events associated with changes in virtual networks (VnTable class) and VRF instances (VrfTable class). More...
 
void Shutdown ()
 Unregisters handlers for events associated with changes in virtual networks (VnTable class) and VRF instances (VrfTable class). More...
 
void VnNotify (DBTablePartBase *partition, DBEntryBase *e)
 A handler for changes (new/update/delete) in a virtual network (VnEntry class). More...
 
void BridgeVnNotify (const VnEntry *vn, VxlanRoutingVnState *vn_state)
 A handler for changes (new/update/delete) in the virtual network from a bridge VRF. More...
 
void RoutingVnNotify (const VnEntry *vn, VxlanRoutingVnState *vn_state)
 A handler for changes (new/update/delete) in the virtual network from a routing VRF. More...
 
void VrfNotify (DBTablePartBase *partition, DBEntryBase *e)
 A handler for changes (new/update/delete) in a VRF instance (VrfEntry class). More...
 
void VmiNotify (DBTablePartBase *partition, DBEntryBase *e)
 Handler for changes (new/update/delete) in a VMI (VmInterface class). More...
 
bool RouteNotify (DBTablePartBase *partition, DBEntryBase *e)
 Handler for changes (new/update/delete) in a route (EVPN or Inet). Main entry point for routes leaking. More...
 
bool WithdrawEvpnRouteFromRoutingVrf (const VrfEntry *routing_vrf, DBTablePartBase *partition, DBEntryBase *e)
 Deletes a given EVPN route from EVPN table of the routing VRF instance. More...
 
bool LeakRoutesIntoBridgeTables (DBTablePartBase *partition, DBEntryBase *e, const boost::uuids::uuid &uuid, const VnEntry *vn, bool update=false)
 Performs advertisement and deletion of routing routes (with VrfNH) in bridge VRF instances. External tunnels and routes with a prefix that is not present in bridge VRF instance are selected for leaking. More...
 
void HandleSubnetRoute (const VrfEntry *vrf, bool bridge_vrf=false)
 Handles routing routes (with VrfNH) update in the routing VRF instance. More...
 
void FillSandeshInfo (VxlanRoutingResp *resp)
 Updates Sandesh response. More...
 
DBTable::ListenerId vn_listener_id () const
 Returns the ID of the listener to changes in the VnTable. More...
 
DBTable::ListenerId vrf_listener_id () const
 Returns the ID of the listener to changes in the VrfTable. More...
 
DBTable::ListenerId vmi_listener_id () const
 Returns the ID of the listener to changes in the InterfaceTable. More...
 
const VxlanRoutingVrfMappervrf_mapper () const
 Returns the map between LR uuids and associated bridge and routing VRF instances. More...
 
AgentRouteWalkerwalker ()
 Returns a pointer to the AgentRouteWalkerPtr object. More...
 
 DISALLOW_COPY_AND_ASSIGN (VxlanRoutingManager)
 

Static Public Member Functions

static void PrintEvpnTable (const VrfEntry *const_vrf)
 Prints EVPN table of the given VRF instance. More...
 
static void PrintInetTable (const VrfEntry *const_vrf)
 Prints IPv4 Inet table of the given VRF instance. More...
 
static void ListAttachedVns ()
 Prints all virtual networks attached to logical routers. More...
 
static VrfEntryVnVrf (const VnEntry *vn, const std::string &vrf_name)
 Finds a VRF table (VrfEntry) for the given virtual network (VN). Returns nullptr if no VRF table associated with this VN or there is no VrfEntry having the given name. More...
 

Private Member Functions

bool InetRouteNotify (DBTablePartBase *partition, DBEntryBase *e)
 Routes leaking functions. More...
 
bool EvpnRouteNotify (DBTablePartBase *partition, DBEntryBase *e)
 Performs routes leaking between the EVPN table of the routing VRF instance and the Inet table of the routing VRF instance. More...
 
void ClearRedundantVrfPath (DBEntryBase *e)
 Removes redundant VrfNH path from a given route. These routes might arise with small chance in a bridge VRF inet tables when tunnels in the routing VRF instance arrive later then in the bridge VRF instance. More...
 
void WhenBridgeInetIntfWasDeleted (const InetUnicastRouteEntry *inet_rt, const VrfEntry *routing_vrf)
 Handles deletion of a route in the EVPN table of the routing VRF instance. More...
 
void WhenRoutingEvpnRouteWasDeleted (const EvpnRouteEntry *routing_evpn_rt, const Peer *delete_from_peer)
 Handles deletion of a route in the Inet table of the routing VRF instance. More...
 
void RoutingVrfDeleteAllRoutes (VrfEntry *rt_vrf)
 deletes all routes in EVPN table of routing VRF More...
 
void DeleteSubnetRoute (const VrfEntry *vrf)
 Deletes subnet routes (actually, paths with VrfNH) in the given bridge VRF. This function is demanded at vn.c:618. More...
 
void DeleteSubnetRoute (const VnEntry *vn, const std::string &vrf_name)
 Deletes subnet routes from a specified virtual network (VirtualNetwork) More...
 
void DeleteIpamRoutes (const VnEntry *vn, const std::string &vrf_name, const IpAddress &ipam_prefix, const uint32_t plen)
 Delete routes to IPAM, specified by IP prefix and prefix length. More...
 
void UpdateSubnetRoute (const VrfEntry *vrf, const VrfEntry *routing_vrf)
 Updates subnet routes (actually, paths with VrfNH) in the given bridge VRF. More...
 
std::string GetOriginVn (const VrfEntry *routing_vrf, const IpAddress &ip_addr, const uint8_t &plen)
 Finds first occurence of a route with the given prefix (IP address and length) in Inet tables of bridge VRF instances connected to the given routing VRF instance (LR). More...
 
bool IsHostRouteFromLocalSubnet (const EvpnRouteEntry *rt)
 Determines whether the given EVPN route is a host one and belongs to a subnet of a local bridge VRF. During the search all subnets in all bridge VRF instances connected to the LR are traversed. More...
 
bool IsVrfLocalRoute (EvpnRouteEntry *routing_evpn_rt, VrfEntry *bridge_vrf)
 Determines if the given EVPN route has an interface NH or a composite of interfaces NH that belongs to the given bridge VRF instance. More...
 
bool IsLocalRoute (EvpnRouteEntry *routing_evpn_rt, VrfEntry *bridge_vrf)
 Determines if the given EVPN route is already present in the given VRF. More...
 
bool HasBgpPeerPath (EvpnRouteEntry *evpn_rt)
 Determines whether the given EVPN route has at least one path originating from BGP/XMPP (has Peer type BGP_PATH) More...
 
TunnelNHKeyAllocateTunnelNextHopKey (const IpAddress &dip, const MacAddress &dmac) const
 XMPP Advertising functions. More...
 
void XmppAdvertiseEvpnRoute (const IpAddress &prefix_ip, const int prefix_len, uint32_t vxlan_id, const std::string vrf_name, const RouteParameters &params, const Peer *bgp_peer, const std::vector< std::string > &peer_sources)
 Advertises an EVPN route received using XMPP channel. More...
 
void XmppAdvertiseInetRoute (const IpAddress &prefix_ip, const int prefix_len, uint32_t vxlan_id, const std::string vrf_name, const RouteParameters &params, const Peer *bgp_peer)
 Advertises an Inet route received using XMPP channel. More...
 
void XmppAdvertiseInetRoute (const IpAddress &prefix_ip, const int prefix_len, const std::string vrf_name, const AgentPath *)
 Advertises an Inet route received from EVPN table. More...
 
void XmppAdvertiseEvpnTunnel (EvpnAgentRouteTable *inet_table, const IpAddress &prefix_ip, const int prefix_len, uint32_t vxlan_id, const std::string vrf_name, const RouteParameters &params, const Peer *bgp_peer)
 Advertises in the EVPN table a tunnel route that arrived via XMPP channel. Must be called only from XmppAdvertiseInetRoute. More...
 
void XmppAdvertiseEvpnInterface (EvpnAgentRouteTable *inet_table, const IpAddress &prefix_ip, const int prefix_len, uint32_t vxlan_id, const std::string vrf_name, const RouteParameters &params, const Peer *bgp_peer, const std::vector< std::string > &peer_sources)
 Advertises in the EVPN table an interface route that arrived via XMPP channel. Must be called only from XmppAdvertiseInetRoute. More...
 
void XmppAdvertiseInetTunnel (InetUnicastAgentRouteTable *inet_table, const IpAddress &prefix_ip, const int prefix_len, uint32_t vxlan_id, const std::string vrf_name, const RouteParameters &params, const Peer *bgp_peer)
 Advertises in the Inet table a tunnel route that arrived via XMPP channel. Must be called only from XmppAdvertiseInetRoute. More...
 
void XmppAdvertiseInetTunnel (InetUnicastAgentRouteTable *inet_table, const IpAddress &prefix_ip, const int prefix_len, const std::string vrf_name, const AgentPath *path)
 Advertises in the Inet table a tunnel route that arrived via XMPP channel. Must be called only from XmppAdvertiseInetRoute. More...
 
void XmppAdvertiseInetInterfaceOrComposite (InetUnicastAgentRouteTable *inet_table, const IpAddress &prefix_ip, const int prefix_len, const std::string vrf_name, const AgentPath *path)
 Advertises in the Inet table an interface route that arrived via XMPP channel. Must be called only from XmppAdvertiseInetRoute. More...
 
void CopyPathToInetTable (const AgentPath *path, const IpAddress &prefix_ip, const uint32_t plen, const Peer *peer, const RouteParameters &params, InetUnicastAgentRouteTable *inet_table)
 Copies the path to the prefix address into the EVPN table with the given Peer. The function is used during routes leaking between routing VRF EVPN and Inet tables. More...
 
void XmppAdvertiseEvpnBgpaas (EvpnAgentRouteTable *evpn_table, const IpAddress &prefix_ip, const int prefix_len, uint32_t vxlan_id, const std::string vrf_name, const RouteParameters &params, const Peer *bgp_peer, const std::vector< std::string > &peer_sources)
 Advertises in an EVPN routing table a BGPaaS route that came from the controller (this routes leaking occurs in the controller). More...
 
void XmppAdvertiseEvpnBgpaasInterface (EvpnAgentRouteTable *evpn_table, const IpAddress &prefix_ip, const int prefix_len, uint32_t vxlan_id, const std::string vrf_name, const RouteParameters &params, const Peer *bgp_peer, const NextHop *nh)
 Advertises in an EVPN routing table a BGPaaS route with interface path that came from the controller (this routes leaking occurs in the controller). More...
 
void XmppAdvertiseEvpnBgpaasComposite (EvpnAgentRouteTable *evpn_table, const IpAddress &prefix_ip, const int prefix_len, uint32_t vxlan_id, const std::string vrf_name, const RouteParameters &params, const Peer *bgp_peer, ComponentNHKeyList &comp_nh_list)
 Advertises in an EVPN routing table a BGPaaS route with interface composite path that came from the controller (this routes leaking occurs in the controller). More...
 

Static Private Member Functions

static uint32_t GetNewLocalSequence (const AgentPath *)
 Auxilliary functions. More...
 
static bool is_ipv4_string (const std::string &prefix_str)
 Determines whether the address string contains an IPv4 address as substring or not. More...
 
static bool is_ipv6_string (const std::string &prefix_str)
 Determines whether the address string contains an IPv6 address as substring or not. More...
 
static uint32_t ipv4_prefix_len (const std::string &prefix_str)
 Extracts length of IPv4 subnet address from the prefix string. More...
 
static std::string ipv4_prefix (const std::string &prefix_str)
 Extracts an IPv4 address string from the prefix string. More...
 
static uint32_t ipv6_prefix_len (const std::string &prefix_str)
 Extracts length of IPv6 subnet address from the prefix string. More...
 
static std::string ipv6_prefix (const std::string &prefix_str)
 Extracts an IPv6 address string from the prefix string. More...
 
static bool IsVxlanAvailable (const Agent *agent)
 Checks whether VxLAN routing manager is enabled or not. More...
 
static bool RoutePrefixIsEqualTo (const EvpnRouteEntry *route, const IpAddress &prefix_ip, const uint32_t prefix_len)
 Determines whether route prefix in the EVPN route is equal to the given pair of prefix IP address and length. More...
 
static bool RoutePrefixIsEqualTo (const InetUnicastRouteEntry *route, const IpAddress &prefix_ip, const uint32_t prefix_len)
 Determines whether route prefix of the Inet route is equal to the given pair of prefix IP address and length. More...
 
static bool IsHostRoute (const IpAddress &prefix_ip, uint32_t prefix_len)
 Determines whether the prefix address and the prefix length point to a host route (/32 for IPv4, /128 for IPv6) or to a subnet route. More...
 
static bool IsHostRoute (const EvpnRouteEntry *rt)
 Determines whether the given EVPN route points to a host or a subnet. More...
 
static bool HasVrfNexthop (const AgentRoute *rt)
 Determines whether the given route has the path with a VRF nexthop (VrfNH) More...
 
static bool IsRoutingVrf (const VrfEntry *vrf)
 Determines whether the pointer to the VRF instance is of routing type. More...
 
static bool IsBridgeVrf (const VrfEntry *vrf)
 Determines whether the pointer to the VRF instance is of bridge type. More...
 
static bool IsRoutingVrf (const std::string vrf_name, const Agent *agent)
 Checks whether the VRF instance with the given name is routing or not. More...
 
static const AgentPathFindPathWithGivenPeer (const AgentRoute *inet_rt, const Peer::Type peer_type)
 Finds in the given route the path with a specified Peer type. More...
 
static const AgentPathFindPathWithGivenPeerAndNexthop (const AgentRoute *inet_rt, const Peer::Type peer_type, const NextHop::Type nh_type, bool strict_match=true)
 Finds in the given route the path with a specified Peer type and a specified nexthop type. More...
 
static const AgentPathFindInterfacePathWithGivenPeer (const AgentRoute *inet_rt, const Peer::Type peer_type, bool strict_match=true)
 Finds in the given route the path with the given Peer type and interface nexthop (InterfaceNH). More...
 
static const AgentPathFindInterfacePathWithBgpPeer (const AgentRoute *inet_rt, bool strict_match=true)
 Finds in the given route the path which has the BGP_PEER Peer type and the Interface nexthop type. Such path presumably points to BGPaaS advertised route. More...
 
static const AgentPathFindInterfacePathWithLocalVmPeer (const AgentRoute *inet_rt, bool strict_match=true)
 Finds in the given route the path which has the LOCAL_VM_PEER peer type and the Interface nexthop type. More...
 
static MacAddress NbComputeMac (const Ip4Address &compute_ip, const Agent *agent)
 Returns the MAC address for the IP of a given neighbouring compute. More...
 
template<class ItType >
static std::vector< IpAddressItemNexthopsToVector (ItType *item)
 Templates. More...
 
template<typename NhType >
static void AddInterfaceComponentToList (const std::string &prefix_str, const std::string &vrf_name, const NhType &nh_item, ComponentNHKeyList &comp_nh_list, std::vector< std::string > &peer_sources)
 Adds an interface or a composite of interfaces nexthops to the list of components NH keys needed for construction of the a mixed composite. More...
 
template<typename NhType >
static void AddBgpaasInterfaceComponentToList (const std::string &vrf_name, const NhType &nh_item, ComponentNHKeyList &comp_nh_list, std::vector< std::string > &peer_sources)
 
static AgentRouteFindEvpnOrInetRoute (const Agent *agent, const std::string &vrf_name, const IpAddress &ip_addr, uint32_t prefix_len, const autogen::EnetNextHopType &nh_item)
 Finds a route with the given prefix address and len in the EVPN table. More...
 
static AgentRouteFindEvpnOrInetRoute (const Agent *agent, const std::string &vrf_name, const IpAddress &ip_addr, uint32_t prefix_len, const autogen::NextHopType &nh_item)
 Finds a route with the given prefix address and len in the Inet table. More...
 
static void DeleteOldInterfacePath (const IpAddress &prefix_ip, const uint32_t plen, const Peer *peer, EvpnAgentRouteTable *evpn_table)
 Routes copying functions. More...
 
static void CopyInterfacePathToEvpnTable (const AgentPath *path, const IpAddress &prefix_ip, const uint32_t plen, const Peer *peer, const RouteParameters &params, EvpnAgentRouteTable *evpn_table)
 Copies the path to the prefix address into the EVPN table with the given Peer. The function is used during routes leaking between bridge VRF Inet and routing EVPN tables. More...
 
static void DeleteOldInterfacePath (const IpAddress &prefix_ip, const uint32_t plen, const Peer *peer, InetUnicastAgentRouteTable *inet_table)
 

Private Attributes

Agentagent_
 A pointer to the Agent instance. More...
 
AgentRouteWalkerPtr walker_
 A pointer to the walker to loop over INET tables in bridge VRF instances. More...
 
DBTable::ListenerId vn_listener_id_
 An ID of the listener to changes in VnTable. More...
 
DBTable::ListenerId vrf_listener_id_
 An ID of the listener to changes in VrfTable. More...
 
DBTable::ListenerId vmi_listener_id_
 An ID of the listener to changes in InterfaceTable. More...
 
VxlanRoutingVrfMapper vrf_mapper_
 A map between LR uuids and associated bridge and routing VRF instances. More...
 

Static Private Attributes

static const Peerrouting_vrf_interface_peer_ = NULL
 Internal data of this class. More...
 
static const Peerrouting_vrf_vxlan_bgp_peer_ = NULL
 A pointer to the Peer where all BGP routes are stored. More...
 
static uint32_t loc_sequence_ = 0
 An always increasing counter for new paths (used to signal controoler about new routes). More...
 

Friends

class VxlanRoutingRouteWalker
 Friends declarations. More...
 
class ControllerEcmpRoute
 Allows ControllerEcmpRoute to use private members of this class. More...
 
class AgentXmppChannel
 Allows AgentXmppChannel to use private members of this class. More...
 
class AgentXmppChannelVxlanInterface
 Allows access to Xmpp advertisement functions via external class. More...
 
class VxlanRoutingVrfMapper
 Allows VxlanRoutingVrfMapper to use private members of this class. More...
 
class MetadataProxy
 Allows MetadataProxy to use private members of this class. More...
 

Detailed Description

This class manages an operative state of VxLAN logical routers (LR) defined via Config logical-router element. The operative state include bonds between LRs, virtual networks, VRFs and corresponding routes which support connectivity between networks connected to a LR.

Given a logical router (LR), there is precisely 1 routing virtual network (VN) and a routing VRF table associated with it and zero or more bridge VNs (and corresponding VRF tables) whose states are manipulated by VxlanRoutingManager using routes leaking process. Routes leaking is a routing tables bi-directional manipulation process during which:

  • new VM interface routes arising in the bridge VRF tables are being transferred into the routing VRF table associated with the LR (forward propagation of routes);
  • new routes arising in the routing VRF table are redistributed among the bridge VRF tables associated with the LR (backward propagation of routes);
  • deletion of created routes in the routing or a bridge VRF leads to the deletion of the corresponding created routes in other VRF tables associated with the LR.

In a nutshell, routes leaking is a kind of data synchronization process between several routing tables.

A bridge virtual network is a basic element in OpenSDN that manages network connectivity between several VMs within a broadcast domain. A routing virtual network is a technical virtual network associated with a LR and providing connectivity between several bridge virtual networks attached to (associated with) the LR.

The information about an LR is loaded into (or unloaded from) the Agent’s operative DB when the processing of a corresponding IF-MAP node changes triggers notifications for associated tables: the interfaces tables (InterfaceTable class), the virtual networks table (VnTable class) and the VRFs tables (VrfTable class). The changes to the IF-MAP nodes arise due to such events as a connection of a virtual network with an LR (or a disconnection of a VN from an LR), appearance of a first VM connected to an LR via a bridge network or a destruction of a last VM (connected to an LR) on a hypervisor. VxlanRoutingManager links these notifications with its member functions: VxlanRoutingManager::VmiNotify, VxlanRoutingManager::VnNotify and VxlanRoutingManager::VrfNotify and they are called VmiNotify, VnNotify and VrfNotify for brevity.

Due to concurrency mechanisms, these functions can run in various order. However, only specific order guarantees lack of inconsistencies in the VxlanRoutingManager data describing state of an LR:

  1. if an LR is being created or updated (e.g., a bridge network is being attached to it), then the correct notifications processing order is VmiNotify, VnNotify and VrfNotify, in this case routes leaking functions which are called by RouteNotify member of VxlanRoutingManager will not start execution until all information from IF-MAP is not correctly transferred into the operative DB;
  2. if an LR is being destroyed (or a bridge network is being detached from it), then the situation is not so obvious, because (a) on the one hand, VrfNotify should be called first to prevent unexpected routes leaking from the disconnected or destroyed bridge virtual network, however this breaks normal event-based mechanism of routes update in the LR's bridge networks due to changes in the LR's routing network (since RouteNotify handler will be disconnected) therefore, (b) the only second viable option is when VnNotify is called first.

The preferred order of execution for functions VrfNotify, VmiNotoify and VnNotify cannot be specified explicitly from VxlanRoutingMananger, since it is controlled by (a) arrival of IF-MAP information on a hypervisor node from a controller and (b) by policies of Agent's operative DB. For some cases, the correctness of execution is guaranteed by the order of IF-MAP nodes processing, in some cases, it is guaranteed by additonal calls inside VxlanRoutingManager.

VxlanRoutingManager acts as a kernel module in some sense: it has several member functions acting as an entry point and providing service to its caller: an information about the current state of the module, modification of the internal state, modifiction of external state (routes advertisement). These entry points are:

The internal state of VxlanRoutingManager is defined by a map between an LR UUID and virtual networks / VRF tables, associated with this LR. The map is defined in VxlanRoutingVrfMapper class and stored as std::map for a pair of {boost::uuids::uuid, VxlanRoutingVrfMapper::RoutedVrfInfo}, where VxlanRoutingVrfMapper::RoutedVrfInfo stores:

  • a pointer to a VnEntry object containing description of the routing VN associated with the LR;
  • a list of pointers to VnEntry objects containing description of bridge VNs associated with the LR;
  • an array of names of VrfEntry objects containing description of bridge and routing VRF tables linked with the corresponding VNs. In addition, VxlanRoutingVrfMapper contains a reverse map, that determines an LR UUID by a pointer to an VnEntry object, associated with an LR as a bridge or a routing VN.

The external state, which is modified by VxlanRoutingManager, is characterized by:

Since the aforementioned VxlanRoutingManager entry points are executed in tasks with the same task code and task data ID (see Task class), their execution is mutually exclusive, i.e., they cannot run in parallel, but the order of their execution is not predetermined.

Definition at line 545 of file vxlan_routing_manager.h.

Constructor & Destructor Documentation

◆ VxlanRoutingManager()

VxlanRoutingManager::VxlanRoutingManager ( Agent agent)

Constructs instance of the class and links to the Agent class instance. Since only one agent class instance works per system process, this implies that only one instance of VxlanRoutingManager exists.

VxlanRoutingManager

Definition at line 350 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ ~VxlanRoutingManager()

VxlanRoutingManager::~VxlanRoutingManager ( )
virtual

Destroys the VxlanRoutingManager instance.

Definition at line 358 of file vxlan_routing_manager.cc.

Member Function Documentation

◆ AddBgpaasInterfaceComponentToList()

template<typename NhType >
void VxlanRoutingManager::AddBgpaasInterfaceComponentToList ( const std::string &  vrf_name,
const NhType &  nh_item,
ComponentNHKeyList comp_nh_list,
std::vector< std::string > &  peer_sources 
)
staticprivate

Definition at line 69 of file vxlan_templates.cc.

Here is the call graph for this function:

◆ AddInterfaceComponentToList()

template<typename NhType >
void VxlanRoutingManager::AddInterfaceComponentToList ( const std::string &  prefix_str,
const std::string &  vrf_name,
const NhType &  nh_item,
ComponentNHKeyList comp_nh_list,
std::vector< std::string > &  peer_sources 
)
staticprivate

Adds an interface or a composite of interfaces nexthops to the list of components NH keys needed for construction of the a mixed composite.

Definition at line 157 of file vxlan_templates.cc.

Here is the call graph for this function:

◆ AllocateTunnelNextHopKey()

TunnelNHKey * VxlanRoutingManager::AllocateTunnelNextHopKey ( const IpAddress dip,
const MacAddress dmac 
) const
private

XMPP Advertising functions.

Allocates and returns a new key for the VxLAN tunnel to the given router

Definition at line 25 of file vxlan_xmpp_routes.cc.

Here is the call graph for this function:

◆ BridgeVnNotify()

void VxlanRoutingManager::BridgeVnNotify ( const VnEntry vn,
VxlanRoutingVnState vn_state 
)

A handler for changes (new/update/delete) in the virtual network from a bridge VRF.

Definition at line 466 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ ClearRedundantVrfPath()

void VxlanRoutingManager::ClearRedundantVrfPath ( DBEntryBase e)
private

Removes redundant VrfNH path from a given route. These routes might arise with small chance in a bridge VRF inet tables when tunnels in the routing VRF instance arrive later then in the bridge VRF instance.

Definition at line 208 of file vxlan_routes_leaking.cc.

Here is the call graph for this function:

◆ CopyInterfacePathToEvpnTable()

void VxlanRoutingManager::CopyInterfacePathToEvpnTable ( const AgentPath path,
const IpAddress prefix_ip,
const uint32_t  plen,
const Peer peer,
const RouteParameters params,
EvpnAgentRouteTable evpn_table 
)
staticprivate

Copies the path to the prefix address into the EVPN table with the given Peer. The function is used during routes leaking between bridge VRF Inet and routing EVPN tables.

Definition at line 695 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ CopyPathToInetTable()

void VxlanRoutingManager::CopyPathToInetTable ( const AgentPath path,
const IpAddress prefix_ip,
const uint32_t  plen,
const Peer peer,
const RouteParameters params,
InetUnicastAgentRouteTable inet_table 
)
private

Copies the path to the prefix address into the EVPN table with the given Peer. The function is used during routes leaking between routing VRF EVPN and Inet tables.

Definition at line 748 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ DeleteIpamRoutes()

void VxlanRoutingManager::DeleteIpamRoutes ( const VnEntry vn,
const std::string &  vrf_name,
const IpAddress ipam_prefix,
const uint32_t  plen 
)
private

Delete routes to IPAM, specified by IP prefix and prefix length.

Definition at line 797 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ DeleteOldInterfacePath() [1/2]

void VxlanRoutingManager::DeleteOldInterfacePath ( const IpAddress prefix_ip,
const uint32_t  plen,
const Peer peer,
EvpnAgentRouteTable evpn_table 
)
staticprivate

Routes copying functions.

Deletes interface path specified with IP prefix, prefix length and Peer from the EVPN table.

Definition at line 674 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ DeleteOldInterfacePath() [2/2]

void VxlanRoutingManager::DeleteOldInterfacePath ( const IpAddress prefix_ip,
const uint32_t  plen,
const Peer peer,
InetUnicastAgentRouteTable inet_table 
)
staticprivate

Definition at line 727 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ DeleteSubnetRoute() [1/2]

void VxlanRoutingManager::DeleteSubnetRoute ( const VnEntry vn,
const std::string &  vrf_name 
)
private

Deletes subnet routes from a specified virtual network (VirtualNetwork)

Definition at line 832 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ DeleteSubnetRoute() [2/2]

void VxlanRoutingManager::DeleteSubnetRoute ( const VrfEntry vrf)
private

Deletes subnet routes (actually, paths with VrfNH) in the given bridge VRF. This function is demanded at vn.c:618.

Definition at line 882 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ DISALLOW_COPY_AND_ASSIGN()

VxlanRoutingManager::DISALLOW_COPY_AND_ASSIGN ( VxlanRoutingManager  )

◆ EvpnRouteNotify()

bool VxlanRoutingManager::EvpnRouteNotify ( DBTablePartBase partition,
DBEntryBase e 
)
private

Performs routes leaking between the EVPN table of the routing VRF instance and the Inet table of the routing VRF instance.

Definition at line 139 of file vxlan_routes_leaking.cc.

Here is the call graph for this function:

◆ FillSandeshInfo()

void VxlanRoutingManager::FillSandeshInfo ( VxlanRoutingResp *  resp)

Updates Sandesh response.

sandesh request

Definition at line 967 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ FindEvpnOrInetRoute() [1/2]

static AgentRoute* VxlanRoutingManager::FindEvpnOrInetRoute ( const Agent agent,
const std::string &  vrf_name,
const IpAddress ip_addr,
uint32_t  prefix_len,
const autogen::EnetNextHopType &  nh_item 
)
staticprivate

Finds a route with the given prefix address and len in the EVPN table.

◆ FindEvpnOrInetRoute() [2/2]

static AgentRoute* VxlanRoutingManager::FindEvpnOrInetRoute ( const Agent agent,
const std::string &  vrf_name,
const IpAddress ip_addr,
uint32_t  prefix_len,
const autogen::NextHopType &  nh_item 
)
staticprivate

Finds a route with the given prefix address and len in the Inet table.

◆ FindInterfacePathWithBgpPeer()

const AgentPath * VxlanRoutingManager::FindInterfacePathWithBgpPeer ( const AgentRoute inet_rt,
bool  strict_match = true 
)
staticprivate

Finds in the given route the path which has the BGP_PEER Peer type and the Interface nexthop type. Such path presumably points to BGPaaS advertised route.

Definition at line 399 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ FindInterfacePathWithGivenPeer()

const AgentPath * VxlanRoutingManager::FindInterfacePathWithGivenPeer ( const AgentRoute inet_rt,
const Peer::Type  peer_type,
bool  strict_match = true 
)
staticprivate

Finds in the given route the path with the given Peer type and interface nexthop (InterfaceNH).

Definition at line 391 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ FindInterfacePathWithLocalVmPeer()

const AgentPath * VxlanRoutingManager::FindInterfacePathWithLocalVmPeer ( const AgentRoute inet_rt,
bool  strict_match = true 
)
staticprivate

Finds in the given route the path which has the LOCAL_VM_PEER peer type and the Interface nexthop type.

Definition at line 406 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ FindPathWithGivenPeer()

const AgentPath * VxlanRoutingManager::FindPathWithGivenPeer ( const AgentRoute inet_rt,
const Peer::Type  peer_type 
)
staticprivate

Finds in the given route the path with a specified Peer type.

Definition at line 341 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ FindPathWithGivenPeerAndNexthop()

const AgentPath * VxlanRoutingManager::FindPathWithGivenPeerAndNexthop ( const AgentRoute inet_rt,
const Peer::Type  peer_type,
const NextHop::Type  nh_type,
bool  strict_match = true 
)
staticprivate

Finds in the given route the path with a specified Peer type and a specified nexthop type.

Definition at line 361 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ GetNewLocalSequence()

uint32_t VxlanRoutingManager::GetNewLocalSequence ( const AgentPath path)
staticprivate

Auxilliary functions.

Returns new value of a local sequence. Thread safe version

Definition at line 54 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ GetOriginVn()

std::string VxlanRoutingManager::GetOriginVn ( const VrfEntry routing_vrf,
const IpAddress ip_addr,
const uint8_t &  plen 
)
private

Finds first occurence of a route with the given prefix (IP address and length) in Inet tables of bridge VRF instances connected to the given routing VRF instance (LR).

Definition at line 145 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ HandleSubnetRoute()

void VxlanRoutingManager::HandleSubnetRoute ( const VrfEntry vrf,
bool  bridge_vrf = false 
)

Handles routing routes (with VrfNH) update in the routing VRF instance.

Definition at line 780 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ HasBgpPeerPath()

bool VxlanRoutingManager::HasBgpPeerPath ( EvpnRouteEntry evpn_rt)
private

Determines whether the given EVPN route has at least one path originating from BGP/XMPP (has Peer type BGP_PATH)

Definition at line 281 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ HasVrfNexthop()

bool VxlanRoutingManager::HasVrfNexthop ( const AgentRoute rt)
staticprivate

Determines whether the given route has the path with a VRF nexthop (VrfNH)

Definition at line 265 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ InetRouteNotify()

bool VxlanRoutingManager::InetRouteNotify ( DBTablePartBase partition,
DBEntryBase e 
)
private

Routes leaking functions.

Performs routes leaking between the Inet table of a bridge VRF instance and the EVPN table of the routing VRF instance.

Definition at line 76 of file vxlan_routes_leaking.cc.

Here is the call graph for this function:

◆ ipv4_prefix()

std::string VxlanRoutingManager::ipv4_prefix ( const std::string &  prefix_str)
staticprivate

Extracts an IPv4 address string from the prefix string.

Definition at line 83 of file vxlan_auxilliary.cc.

◆ ipv4_prefix_len()

uint32_t VxlanRoutingManager::ipv4_prefix_len ( const std::string &  prefix_str)
staticprivate

Extracts length of IPv4 subnet address from the prefix string.

Definition at line 72 of file vxlan_auxilliary.cc.

◆ ipv6_prefix()

std::string VxlanRoutingManager::ipv6_prefix ( const std::string &  prefix_str)
staticprivate

Extracts an IPv6 address string from the prefix string.

Definition at line 115 of file vxlan_auxilliary.cc.

◆ ipv6_prefix_len()

uint32_t VxlanRoutingManager::ipv6_prefix_len ( const std::string &  prefix_str)
staticprivate

Extracts length of IPv6 subnet address from the prefix string.

Definition at line 104 of file vxlan_auxilliary.cc.

◆ is_ipv4_string()

bool VxlanRoutingManager::is_ipv4_string ( const std::string &  prefix_str)
staticprivate

Determines whether the address string contains an IPv4 address as substring or not.

Definition at line 63 of file vxlan_auxilliary.cc.

◆ is_ipv6_string()

bool VxlanRoutingManager::is_ipv6_string ( const std::string &  prefix_str)
staticprivate

Determines whether the address string contains an IPv6 address as substring or not.

Definition at line 67 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ IsBridgeVrf()

bool VxlanRoutingManager::IsBridgeVrf ( const VrfEntry vrf)
staticprivate

Determines whether the pointer to the VRF instance is of bridge type.

Returns
true if it is routing, otherwise return value is false.

Definition at line 317 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ IsHostRoute() [1/2]

bool VxlanRoutingManager::IsHostRoute ( const EvpnRouteEntry rt)
staticprivate

Determines whether the given EVPN route points to a host or a subnet.

Definition at line 200 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ IsHostRoute() [2/2]

bool VxlanRoutingManager::IsHostRoute ( const IpAddress prefix_ip,
uint32_t  prefix_len 
)
staticprivate

Determines whether the prefix address and the prefix length point to a host route (/32 for IPv4, /128 for IPv6) or to a subnet route.

Definition at line 192 of file vxlan_auxilliary.cc.

◆ IsHostRouteFromLocalSubnet()

bool VxlanRoutingManager::IsHostRouteFromLocalSubnet ( const EvpnRouteEntry rt)
private

Determines whether the given EVPN route is a host one and belongs to a subnet of a local bridge VRF. During the search all subnets in all bridge VRF instances connected to the LR are traversed.

Definition at line 207 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ IsLocalRoute()

bool VxlanRoutingManager::IsLocalRoute ( EvpnRouteEntry routing_evpn_rt,
VrfEntry bridge_vrf 
)
private

Determines if the given EVPN route is already present in the given VRF.

◆ IsRoutingVrf() [1/2]

bool VxlanRoutingManager::IsRoutingVrf ( const std::string  vrf_name,
const Agent agent 
)
staticprivate

Checks whether the VRF instance with the given name is routing or not.

Returns
true if this VRF is routing, otherwise return value is false.

Definition at line 323 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ IsRoutingVrf() [2/2]

bool VxlanRoutingManager::IsRoutingVrf ( const VrfEntry vrf)
staticprivate

Determines whether the pointer to the VRF instance is of routing type.

Returns
true if it is routing, otherwise return value is false.

Definition at line 296 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ IsVrfLocalRoute()

bool VxlanRoutingManager::IsVrfLocalRoute ( EvpnRouteEntry routing_evpn_rt,
VrfEntry bridge_vrf 
)
private

Determines if the given EVPN route has an interface NH or a composite of interfaces NH that belongs to the given bridge VRF instance.

Definition at line 245 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ IsVxlanAvailable()

bool VxlanRoutingManager::IsVxlanAvailable ( const Agent agent)
staticprivate

Checks whether VxLAN routing manager is enabled or not.

Definition at line 134 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ ItemNexthopsToVector()

template<class ItType >
std::vector< IpAddress > VxlanRoutingManager::ItemNexthopsToVector ( ItType *  item)
staticprivate

Templates.

Converts item's (EnetItemType for EVPN / ItemType for Inet) nexthops into the list of IP addresses (IpAddress)

Definition at line 10 of file vxlan_templates.cc.

◆ LeakRoutesIntoBridgeTables()

bool VxlanRoutingManager::LeakRoutesIntoBridgeTables ( DBTablePartBase partition,
DBEntryBase e,
const boost::uuids::uuid uuid,
const VnEntry vn,
bool  update = false 
)

Performs advertisement and deletion of routing routes (with VrfNH) in bridge VRF instances. External tunnels and routes with a prefix that is not present in bridge VRF instance are selected for leaking.

Definition at line 363 of file vxlan_routes_leaking.cc.

Here is the call graph for this function:

◆ ListAttachedVns()

void VxlanRoutingManager::ListAttachedVns ( )
static

Prints all virtual networks attached to logical routers.

Definition at line 889 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ NbComputeMac()

MacAddress VxlanRoutingManager::NbComputeMac ( const Ip4Address compute_ip,
const Agent agent 
)
staticprivate

Returns the MAC address for the IP of a given neighbouring compute.

Definition at line 413 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ PrintEvpnTable()

void VxlanRoutingManager::PrintEvpnTable ( const VrfEntry const_vrf)
static

Prints EVPN table of the given VRF instance.

Definition at line 776 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ PrintInetTable()

void VxlanRoutingManager::PrintInetTable ( const VrfEntry const_vrf)
static

Prints IPv4 Inet table of the given VRF instance.

Definition at line 834 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ Register()

void VxlanRoutingManager::Register ( )

Registers handlers for events associated with changes in virtual networks (VnTable class) and VRF instances (VrfTable class).

Definition at line 361 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ RouteNotify()

bool VxlanRoutingManager::RouteNotify ( DBTablePartBase partition,
DBEntryBase e 
)

Handler for changes (new/update/delete) in a route (EVPN or Inet). Main entry point for routes leaking.

Definition at line 33 of file vxlan_routes_leaking.cc.

Here is the call graph for this function:

◆ RoutePrefixIsEqualTo() [1/2]

bool VxlanRoutingManager::RoutePrefixIsEqualTo ( const EvpnRouteEntry route,
const IpAddress prefix_ip,
const uint32_t  prefix_len 
)
staticprivate

Determines whether route prefix in the EVPN route is equal to the given pair of prefix IP address and length.

Definition at line 170 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ RoutePrefixIsEqualTo() [2/2]

bool VxlanRoutingManager::RoutePrefixIsEqualTo ( const InetUnicastRouteEntry route,
const IpAddress prefix_ip,
const uint32_t  prefix_len 
)
staticprivate

Determines whether route prefix of the Inet route is equal to the given pair of prefix IP address and length.

Definition at line 181 of file vxlan_auxilliary.cc.

Here is the call graph for this function:

◆ RoutingVnNotify()

void VxlanRoutingManager::RoutingVnNotify ( const VnEntry vn,
VxlanRoutingVnState vn_state 
)

A handler for changes (new/update/delete) in the virtual network from a routing VRF.

Definition at line 627 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ RoutingVrfDeleteAllRoutes()

void VxlanRoutingManager::RoutingVrfDeleteAllRoutes ( VrfEntry rt_vrf)
private

deletes all routes in EVPN table of routing VRF

Definition at line 560 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ Shutdown()

void VxlanRoutingManager::Shutdown ( )

Unregisters handlers for events associated with changes in virtual networks (VnTable class) and VRF instances (VrfTable class).

Definition at line 378 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ UpdateSubnetRoute()

void VxlanRoutingManager::UpdateSubnetRoute ( const VrfEntry vrf,
const VrfEntry routing_vrf 
)
private

Updates subnet routes (actually, paths with VrfNH) in the given bridge VRF.

Definition at line 888 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ vmi_listener_id()

DBTable::ListenerId VxlanRoutingManager::vmi_listener_id ( ) const
inline

Returns the ID of the listener to changes in the InterfaceTable.

Definition at line 680 of file vxlan_routing_manager.h.

◆ VmiNotify()

void VxlanRoutingManager::VmiNotify ( DBTablePartBase partition,
DBEntryBase e 
)

Handler for changes (new/update/delete) in a VMI (VmInterface class).

Definition at line 721 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ vn_listener_id()

DBTable::ListenerId VxlanRoutingManager::vn_listener_id ( ) const
inline

Returns the ID of the listener to changes in the VnTable.

Definition at line 670 of file vxlan_routing_manager.h.

◆ VnNotify()

void VxlanRoutingManager::VnNotify ( DBTablePartBase partition,
DBEntryBase e 
)

A handler for changes (new/update/delete) in a virtual network (VnEntry class).

VNNotify Handles routing vrf i.e. VRF meant for doing evpn routing. Addition or deletion of same add/withdraws route imported from bridge vrf in routing vrf. Walk is issued for the routes of bridge vrf's evpn table.

For bridge VRF, only delete of VN is handled here. Add has no operation as add of VN does not give any info on LR/Routing VRF to use. When delete is seen withdraw from the list of bridge list.

Definition at line 398 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ VnVrf()

static VrfEntry* VxlanRoutingManager::VnVrf ( const VnEntry vn,
const std::string &  vrf_name 
)
inlinestatic

Finds a VRF table (VrfEntry) for the given virtual network (VN). Returns nullptr if no VRF table associated with this VN or there is no VrfEntry having the given name.

Definition at line 1062 of file vxlan_routing_manager.h.

Here is the call graph for this function:

◆ vrf_listener_id()

DBTable::ListenerId VxlanRoutingManager::vrf_listener_id ( ) const
inline

Returns the ID of the listener to changes in the VrfTable.

Definition at line 675 of file vxlan_routing_manager.h.

◆ vrf_mapper()

const VxlanRoutingVrfMapper& VxlanRoutingManager::vrf_mapper ( ) const
inline

Returns the map between LR uuids and associated bridge and routing VRF instances.

Definition at line 686 of file vxlan_routing_manager.h.

◆ VrfNotify()

void VxlanRoutingManager::VrfNotify ( DBTablePartBase partition,
DBEntryBase e 
)

A handler for changes (new/update/delete) in a VRF instance (VrfEntry class).

Updates (sets or deletes) VxlanRoutingState for the given modified VrfEntry

Definition at line 694 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

◆ walker()

AgentRouteWalker* VxlanRoutingManager::walker ( )
inline

Returns a pointer to the AgentRouteWalkerPtr object.

Definition at line 691 of file vxlan_routing_manager.h.

◆ WhenBridgeInetIntfWasDeleted()

void VxlanRoutingManager::WhenBridgeInetIntfWasDeleted ( const InetUnicastRouteEntry inet_rt,
const VrfEntry routing_vrf 
)
private

Handles deletion of a route in the EVPN table of the routing VRF instance.

Definition at line 231 of file vxlan_routes_leaking.cc.

Here is the call graph for this function:

◆ WhenRoutingEvpnRouteWasDeleted()

void VxlanRoutingManager::WhenRoutingEvpnRouteWasDeleted ( const EvpnRouteEntry routing_evpn_rt,
const Peer delete_from_peer 
)
private

Handles deletion of a route in the Inet table of the routing VRF instance.

Definition at line 290 of file vxlan_routes_leaking.cc.

Here is the call graph for this function:

◆ WithdrawEvpnRouteFromRoutingVrf()

bool VxlanRoutingManager::WithdrawEvpnRouteFromRoutingVrf ( const VrfEntry routing_vrf,
DBTablePartBase partition,
DBEntryBase e 
)

Deletes a given EVPN route from EVPN table of the routing VRF instance.

Definition at line 335 of file vxlan_routes_leaking.cc.

Here is the call graph for this function:

◆ XmppAdvertiseEvpnBgpaas()

void VxlanRoutingManager::XmppAdvertiseEvpnBgpaas ( EvpnAgentRouteTable evpn_table,
const IpAddress prefix_ip,
const int  prefix_len,
uint32_t  vxlan_id,
const std::string  vrf_name,
const RouteParameters params,
const Peer bgp_peer,
const std::vector< std::string > &  peer_sources 
)
private

Advertises in an EVPN routing table a BGPaaS route that came from the controller (this routes leaking occurs in the controller).

Definition at line 230 of file vxlan_xmpp_routes.cc.

Here is the call graph for this function:

◆ XmppAdvertiseEvpnBgpaasComposite()

void VxlanRoutingManager::XmppAdvertiseEvpnBgpaasComposite ( EvpnAgentRouteTable evpn_table,
const IpAddress prefix_ip,
const int  prefix_len,
uint32_t  vxlan_id,
const std::string  vrf_name,
const RouteParameters params,
const Peer bgp_peer,
ComponentNHKeyList comp_nh_list 
)
private

Advertises in an EVPN routing table a BGPaaS route with interface composite path that came from the controller (this routes leaking occurs in the controller).

Definition at line 183 of file vxlan_xmpp_routes.cc.

Here is the call graph for this function:

◆ XmppAdvertiseEvpnBgpaasInterface()

void VxlanRoutingManager::XmppAdvertiseEvpnBgpaasInterface ( EvpnAgentRouteTable evpn_table,
const IpAddress prefix_ip,
const int  prefix_len,
uint32_t  vxlan_id,
const std::string  vrf_name,
const RouteParameters params,
const Peer bgp_peer,
const NextHop nh 
)
private

Advertises in an EVPN routing table a BGPaaS route with interface path that came from the controller (this routes leaking occurs in the controller).

Definition at line 133 of file vxlan_xmpp_routes.cc.

Here is the call graph for this function:

◆ XmppAdvertiseEvpnInterface()

void VxlanRoutingManager::XmppAdvertiseEvpnInterface ( EvpnAgentRouteTable inet_table,
const IpAddress prefix_ip,
const int  prefix_len,
uint32_t  vxlan_id,
const std::string  vrf_name,
const RouteParameters params,
const Peer bgp_peer,
const std::vector< std::string > &  peer_sources 
)
private

Advertises in the EVPN table an interface route that arrived via XMPP channel. Must be called only from XmppAdvertiseInetRoute.

Definition at line 317 of file vxlan_xmpp_routes.cc.

Here is the call graph for this function:

◆ XmppAdvertiseEvpnRoute()

void VxlanRoutingManager::XmppAdvertiseEvpnRoute ( const IpAddress prefix_ip,
const int  prefix_len,
uint32_t  vxlan_id,
const std::string  vrf_name,
const RouteParameters params,
const Peer bgp_peer,
const std::vector< std::string > &  peer_sources 
)
private

Advertises an EVPN route received using XMPP channel.

Definition at line 49 of file vxlan_xmpp_routes.cc.

Here is the call graph for this function:

◆ XmppAdvertiseEvpnTunnel()

void VxlanRoutingManager::XmppAdvertiseEvpnTunnel ( EvpnAgentRouteTable inet_table,
const IpAddress prefix_ip,
const int  prefix_len,
uint32_t  vxlan_id,
const std::string  vrf_name,
const RouteParameters params,
const Peer bgp_peer 
)
private

Advertises in the EVPN table a tunnel route that arrived via XMPP channel. Must be called only from XmppAdvertiseInetRoute.

Definition at line 95 of file vxlan_xmpp_routes.cc.

Here is the call graph for this function:

◆ XmppAdvertiseInetInterfaceOrComposite()

void VxlanRoutingManager::XmppAdvertiseInetInterfaceOrComposite ( InetUnicastAgentRouteTable inet_table,
const IpAddress prefix_ip,
const int  prefix_len,
const std::string  vrf_name,
const AgentPath path 
)
private

Advertises in the Inet table an interface route that arrived via XMPP channel. Must be called only from XmppAdvertiseInetRoute.

Definition at line 384 of file vxlan_xmpp_routes.cc.

Here is the call graph for this function:

◆ XmppAdvertiseInetRoute() [1/2]

void VxlanRoutingManager::XmppAdvertiseInetRoute ( const IpAddress prefix_ip,
const int  prefix_len,
const std::string  vrf_name,
const AgentPath path 
)
private

Advertises an Inet route received from EVPN table.

Definition at line 72 of file vxlan_xmpp_routes.cc.

Here is the call graph for this function:

◆ XmppAdvertiseInetRoute() [2/2]

void VxlanRoutingManager::XmppAdvertiseInetRoute ( const IpAddress prefix_ip,
const int  prefix_len,
uint32_t  vxlan_id,
const std::string  vrf_name,
const RouteParameters params,
const Peer bgp_peer 
)
private

Advertises an Inet route received using XMPP channel.

◆ XmppAdvertiseInetTunnel() [1/2]

void VxlanRoutingManager::XmppAdvertiseInetTunnel ( InetUnicastAgentRouteTable inet_table,
const IpAddress prefix_ip,
const int  prefix_len,
const std::string  vrf_name,
const AgentPath path 
)
private

Advertises in the Inet table a tunnel route that arrived via XMPP channel. Must be called only from XmppAdvertiseInetRoute.

Definition at line 354 of file vxlan_xmpp_routes.cc.

Here is the call graph for this function:

◆ XmppAdvertiseInetTunnel() [2/2]

void VxlanRoutingManager::XmppAdvertiseInetTunnel ( InetUnicastAgentRouteTable inet_table,
const IpAddress prefix_ip,
const int  prefix_len,
uint32_t  vxlan_id,
const std::string  vrf_name,
const RouteParameters params,
const Peer bgp_peer 
)
private

Advertises in the Inet table a tunnel route that arrived via XMPP channel. Must be called only from XmppAdvertiseInetRoute.

Friends And Related Function Documentation

◆ AgentXmppChannel

friend class AgentXmppChannel
friend

Allows AgentXmppChannel to use private members of this class.

Definition at line 740 of file vxlan_routing_manager.h.

◆ AgentXmppChannelVxlanInterface

friend class AgentXmppChannelVxlanInterface
friend

Allows access to Xmpp advertisement functions via external class.

Definition at line 743 of file vxlan_routing_manager.h.

◆ ControllerEcmpRoute

friend class ControllerEcmpRoute
friend

Allows ControllerEcmpRoute to use private members of this class.

Definition at line 737 of file vxlan_routing_manager.h.

◆ MetadataProxy

friend class MetadataProxy
friend

Allows MetadataProxy to use private members of this class.

Definition at line 750 of file vxlan_routing_manager.h.

◆ VxlanRoutingRouteWalker

friend class VxlanRoutingRouteWalker
friend

Friends declarations.

Allows access to private members for the VxlanRoutingRouteWalker class.

Definition at line 734 of file vxlan_routing_manager.h.

◆ VxlanRoutingVrfMapper

friend class VxlanRoutingVrfMapper
friend

Allows VxlanRoutingVrfMapper to use private members of this class.

Definition at line 747 of file vxlan_routing_manager.h.

Member Data Documentation

◆ agent_

Agent* VxlanRoutingManager::agent_
private

A pointer to the Agent instance.

Definition at line 707 of file vxlan_routing_manager.h.

◆ loc_sequence_

uint32_t VxlanRoutingManager::loc_sequence_ = 0
staticprivate

An always increasing counter for new paths (used to signal controoler about new routes).

Definition at line 728 of file vxlan_routing_manager.h.

◆ routing_vrf_interface_peer_

const Peer * VxlanRoutingManager::routing_vrf_interface_peer_ = NULL
staticprivate

Internal data of this class.

A pointer to the Peer where all interface / composite of interfaces routes in routing VRF are linked to.

Definition at line 701 of file vxlan_routing_manager.h.

◆ routing_vrf_vxlan_bgp_peer_

const Peer * VxlanRoutingManager::routing_vrf_vxlan_bgp_peer_ = NULL
staticprivate

A pointer to the Peer where all BGP routes are stored.

Definition at line 704 of file vxlan_routing_manager.h.

◆ vmi_listener_id_

DBTable::ListenerId VxlanRoutingManager::vmi_listener_id_
private

An ID of the listener to changes in InterfaceTable.

Definition at line 720 of file vxlan_routing_manager.h.

◆ vn_listener_id_

DBTable::ListenerId VxlanRoutingManager::vn_listener_id_
private

An ID of the listener to changes in VnTable.

Definition at line 714 of file vxlan_routing_manager.h.

◆ vrf_listener_id_

DBTable::ListenerId VxlanRoutingManager::vrf_listener_id_
private

An ID of the listener to changes in VrfTable.

Definition at line 717 of file vxlan_routing_manager.h.

◆ vrf_mapper_

VxlanRoutingVrfMapper VxlanRoutingManager::vrf_mapper_
private

A map between LR uuids and associated bridge and routing VRF instances.

Definition at line 724 of file vxlan_routing_manager.h.

◆ walker_

AgentRouteWalkerPtr VxlanRoutingManager::walker_
private

A pointer to the walker to loop over INET tables in bridge VRF instances.

Definition at line 711 of file vxlan_routing_manager.h.


The documentation for this class was generated from the following files: