|
OpenSDN source code
|
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>

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 VxlanRoutingVrfMapper & | vrf_mapper () const |
| Returns the map between LR uuids and associated bridge and routing VRF instances. More... | |
| AgentRouteWalker * | walker () |
| 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 VrfEntry * | VnVrf (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... | |
| TunnelNHKey * | AllocateTunnelNextHopKey (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 ¶ms, 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 ¶ms, 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 ¶ms, 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 ¶ms, 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 ¶ms, 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 ¶ms, 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 ¶ms, 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 ¶ms, 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 ¶ms, 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 AgentPath * | FindPathWithGivenPeer (const AgentRoute *inet_rt, const Peer::Type peer_type) |
| Finds in the given route the path with a specified Peer type. More... | |
| static const AgentPath * | FindPathWithGivenPeerAndNexthop (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 AgentPath * | FindInterfacePathWithGivenPeer (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 AgentPath * | FindInterfacePathWithBgpPeer (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 AgentPath * | FindInterfacePathWithLocalVmPeer (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< IpAddress > | ItemNexthopsToVector (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 AgentRoute * | FindEvpnOrInetRoute (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 AgentRoute * | FindEvpnOrInetRoute (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 ¶ms, 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 | |
| Agent * | agent_ |
| 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 Peer * | routing_vrf_interface_peer_ = NULL |
| Internal data of this class. More... | |
| static const Peer * | routing_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... | |
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:
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:
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:
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.
| 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.
Definition at line 350 of file vxlan_routing_manager.cc.

|
virtual |
Destroys the VxlanRoutingManager instance.
Definition at line 358 of file vxlan_routing_manager.cc.
|
staticprivate |
|
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.

|
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.

| 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.

|
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.

|
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.

|
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.

|
private |
Delete routes to IPAM, specified by IP prefix and prefix length.
Definition at line 797 of file vxlan_routing_manager.cc.

|
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.

|
staticprivate |
|
private |
Deletes subnet routes from a specified virtual network (VirtualNetwork)
Definition at line 832 of file vxlan_routing_manager.cc.

|
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.

| VxlanRoutingManager::DISALLOW_COPY_AND_ASSIGN | ( | VxlanRoutingManager | ) |
|
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.

| void VxlanRoutingManager::FillSandeshInfo | ( | VxlanRoutingResp * | resp | ) |
Updates Sandesh response.
sandesh request
Definition at line 967 of file vxlan_routing_manager.cc.

|
staticprivate |
Finds a route with the given prefix address and len in the EVPN table.
|
staticprivate |
Finds a route with the given prefix address and len in the Inet table.
|
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.

|
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.

|
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.

|
staticprivate |
Finds in the given route the path with a specified Peer type.
Definition at line 341 of file vxlan_auxilliary.cc.

|
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.

|
staticprivate |
Auxilliary functions.
Returns new value of a local sequence. Thread safe version
Definition at line 54 of file vxlan_auxilliary.cc.

|
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.

| 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.

|
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.

|
staticprivate |
Determines whether the given route has the path with a VRF nexthop (VrfNH)
Definition at line 265 of file vxlan_auxilliary.cc.

|
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.

|
staticprivate |
Extracts an IPv4 address string from the prefix string.
Definition at line 83 of file vxlan_auxilliary.cc.
|
staticprivate |
Extracts length of IPv4 subnet address from the prefix string.
Definition at line 72 of file vxlan_auxilliary.cc.
|
staticprivate |
Extracts an IPv6 address string from the prefix string.
Definition at line 115 of file vxlan_auxilliary.cc.
|
staticprivate |
Extracts length of IPv6 subnet address from the prefix string.
Definition at line 104 of file vxlan_auxilliary.cc.
|
staticprivate |
Determines whether the address string contains an IPv4 address as substring or not.
Definition at line 63 of file vxlan_auxilliary.cc.
|
staticprivate |
Determines whether the address string contains an IPv6 address as substring or not.
Definition at line 67 of file vxlan_auxilliary.cc.

|
staticprivate |
Determines whether the pointer to the VRF instance is of bridge type.
Definition at line 317 of file vxlan_auxilliary.cc.

|
staticprivate |
Determines whether the given EVPN route points to a host or a subnet.
Definition at line 200 of file vxlan_auxilliary.cc.

|
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.
|
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.

|
private |
Determines if the given EVPN route is already present in the given VRF.
|
staticprivate |
Checks whether the VRF instance with the given name is routing or not.
Definition at line 323 of file vxlan_auxilliary.cc.

|
staticprivate |
Determines whether the pointer to the VRF instance is of routing type.
Definition at line 296 of file vxlan_auxilliary.cc.

|
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.

|
staticprivate |
Checks whether VxLAN routing manager is enabled or not.
Definition at line 134 of file vxlan_auxilliary.cc.

|
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.
| 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.

|
static |
Prints all virtual networks attached to logical routers.
Definition at line 889 of file vxlan_auxilliary.cc.

|
staticprivate |
Returns the MAC address for the IP of a given neighbouring compute.
Definition at line 413 of file vxlan_auxilliary.cc.

|
static |
Prints EVPN table of the given VRF instance.
Definition at line 776 of file vxlan_auxilliary.cc.

|
static |
Prints IPv4 Inet table of the given VRF instance.
Definition at line 834 of file vxlan_auxilliary.cc.

| 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.

| 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.

|
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.

|
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.

| 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.

|
private |
deletes all routes in EVPN table of routing VRF
Definition at line 560 of file vxlan_routing_manager.cc.

| 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.

|
private |
Updates subnet routes (actually, paths with VrfNH) in the given bridge VRF.
Definition at line 888 of file vxlan_routing_manager.cc.

|
inline |
Returns the ID of the listener to changes in the InterfaceTable.
Definition at line 680 of file vxlan_routing_manager.h.
| 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.

|
inline |
Returns the ID of the listener to changes in the VnTable.
Definition at line 670 of file vxlan_routing_manager.h.
| 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.

|
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.

|
inline |
Returns the ID of the listener to changes in the VrfTable.
Definition at line 675 of file vxlan_routing_manager.h.
|
inline |
Returns the map between LR uuids and associated bridge and routing VRF instances.
Definition at line 686 of file vxlan_routing_manager.h.
| 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.

|
inline |
Returns a pointer to the AgentRouteWalkerPtr object.
Definition at line 691 of file vxlan_routing_manager.h.
|
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.

|
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.

| 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.

|
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.

|
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.

|
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.

|
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.

|
private |
Advertises an EVPN route received using XMPP channel.
Definition at line 49 of file vxlan_xmpp_routes.cc.

|
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.

|
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.

|
private |
Advertises an Inet route received from EVPN table.
Definition at line 72 of file vxlan_xmpp_routes.cc.

|
private |
Advertises an Inet route received using XMPP channel.
|
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.

|
private |
Advertises in the Inet table a tunnel route that arrived via XMPP channel. Must be called only from XmppAdvertiseInetRoute.
|
friend |
Allows AgentXmppChannel to use private members of this class.
Definition at line 740 of file vxlan_routing_manager.h.
|
friend |
Allows access to Xmpp advertisement functions via external class.
Definition at line 743 of file vxlan_routing_manager.h.
|
friend |
Allows ControllerEcmpRoute to use private members of this class.
Definition at line 737 of file vxlan_routing_manager.h.
|
friend |
Allows MetadataProxy to use private members of this class.
Definition at line 750 of file vxlan_routing_manager.h.
|
friend |
Friends declarations.
Allows access to private members for the VxlanRoutingRouteWalker class.
Definition at line 734 of file vxlan_routing_manager.h.
|
friend |
Allows VxlanRoutingVrfMapper to use private members of this class.
Definition at line 747 of file vxlan_routing_manager.h.
|
private |
A pointer to the Agent instance.
Definition at line 707 of file vxlan_routing_manager.h.
|
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.
|
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.
|
staticprivate |
A pointer to the Peer where all BGP routes are stored.
Definition at line 704 of file vxlan_routing_manager.h.
|
private |
An ID of the listener to changes in InterfaceTable.
Definition at line 720 of file vxlan_routing_manager.h.
|
private |
An ID of the listener to changes in VnTable.
Definition at line 714 of file vxlan_routing_manager.h.
|
private |
An ID of the listener to changes in VrfTable.
Definition at line 717 of file vxlan_routing_manager.h.
|
private |
A map between LR uuids and associated bridge and routing VRF instances.
Definition at line 724 of file vxlan_routing_manager.h.
|
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.