OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VxlanRoutingVrfMapper Class Reference

The class is used to store following information: More...

#include <vxlan_routing_manager.h>

Collaboration diagram for VxlanRoutingVrfMapper:

Classes

struct  RoutedVrfInfo
 The structure holds information about virtual networks connected to a logical router (LR) More...
 

Public Types

typedef std::map
< boost::uuids::uuid,
RoutedVrfInfo
LrVrfInfoMap
 A typedef to store map between Logical router UUID and RoutedVrfInfo. More...
 
typedef LrVrfInfoMap::iterator LrVrfInfoMapIter
 A typedef for iterator of LrVrfInfoMap. More...
 
typedef std::map< const
VnEntry *, boost::uuids::uuid
VnLrSet
 A typedef to store map between pointer to VirtualNetwork (a bridge or routing virtual network connected to some LR) and the LR's UUID. More...
 
typedef VnLrSet::iterator VnLrSetIter
 A typedef for iterator of VnLrSet. More...
 
typedef std::map< const
InetUnicastAgentRouteTable
*, DBTable::DBTableWalkRef
InetTableWalker
 A typedef for a storage of all walkers on Inet tables, if needed the walk can be restarted instead of spawning new one for a table. More...
 

Public Member Functions

 VxlanRoutingVrfMapper (VxlanRoutingManager *mgr)
 Constructs a new instance of VxlanRoutingVrfMapper using the given pointer to VxlanRoutingManager. More...
 
virtual ~VxlanRoutingVrfMapper ()
 Destroys an instance of VxlanRoutingVrfMapper(). More...
 
void BridgeInet4RouteWalkDone (DBTable::DBTableWalkRef walk_ref, DBTableBase *partition)
 Handles completion of route walk in the Inet IPv4 table of a bridge VRF instance. More...
 
void BridgeInet6RouteWalkDone (DBTable::DBTableWalkRef walk_ref, DBTableBase *partition)
 Handles completion of route walk in an Inet IPv6 table of a bridge VRF instance. More...
 
void RoutingVrfRouteWalkDone (DBTable::DBTableWalkRef walk_ref, DBTableBase *partition)
 Handles completion of route walk in the EVPN table of a routing VRF instance. More...
 
void TryDeleteLogicalRouter (LrVrfInfoMapIter &it)
 Attempts to delete the given LR. More...
 
bool IsEmpty () const
 Determines whether object is empty or not. More...
 

Private Member Functions

void WalkBridgeVrfs (const RoutedVrfInfo &routing_vrf_info)
 Walks Inet tables of all bridge VRF instances connected to a LR (given in routing_vrf_info parameter). More...
 
void WalkRoutingVrf (const boost::uuids::uuid &lr_uuid, const VnEntry *vn, bool update, bool withdraw)
 Walks the EVPN table of the routing VRF instance of a given LR. More...
 
void WalkBridgeInetTables (InetUnicastAgentRouteTable *inet4, InetUnicastAgentRouteTable *inet6)
 Walks given Inet tables (IPv4 and IPv6). More...
 
const VrfEntryGetRoutingVrfUsingVn (const VnEntry *vn)
 Find the routing VRF instance using a given virtual network. More...
 
const VrfEntryGetRoutingVrfUsingAgentRoute (const AgentRoute *rt)
 Find the routing VRF instance using a given route (AgentRoute). More...
 
const VrfEntryGetRoutingVrfUsingUuid (const boost::uuids::uuid &lr_uuid)
 Find the routing VRF instance using a given LR UUID. More...
 
const boost::uuids::uuid GetLogicalRouterUuidUsingRoute (const AgentRoute *rt)
 Find the UUID of the LR using a given route (AgentRoute). More...
 
 DISALLOW_COPY_AND_ASSIGN (VxlanRoutingVrfMapper)
 

Private Attributes

VxlanRoutingManagermgr_
 A pointer to the VxlanRoutingManager instance. More...
 
LrVrfInfoMap lr_vrf_info_map_
 The map between Logical router UUID and RoutedVrfInfo. More...
 
VnLrSet vn_lr_set_
 The map between pointer to VirtualNetwork (a bridge or routing virtual network connected to some LR) and the LR's UUID. More...
 
InetTableWalker inet4_table_walker_
 The set of walkers for Inet IPv4 tables of bridge VRF instances. More...
 
InetTableWalker inet6_table_walker_
 The set of walkers for Inet IPv6 tables of bridge VRF instances. More...
 

Friends

class VxlanRoutingManager
 Allows access to private members for VxlanRoutingManager class. More...
 

Detailed Description

The class is used to store following information:

  • VN to LR uuid mapping
  • LR to RoutedVrfInfo mapping. RoutedVrfInfo - Contains l3vrf as routing vrf and list of all bridge vrf linked to this routing vrf. Along with these it has a walker for walking evpn tables. EVPN walk is triggered for following reasons:
  • detection of l3vrf, walks all bridge evpn linked to same.
  • bridge vrf addition - Here evpn table of this bridge vrf is walked.
  • deletion of vrf (If multiple walks get scheduled for evpn table then they are collapsed and only one walk is done)

Definition at line 262 of file vxlan_routing_manager.h.

Member Typedef Documentation

A typedef for a storage of all walkers on Inet tables, if needed the walk can be restarted instead of spawning new one for a table.

Definition at line 326 of file vxlan_routing_manager.h.

A typedef to store map between Logical router UUID and RoutedVrfInfo.

Definition at line 309 of file vxlan_routing_manager.h.

typedef LrVrfInfoMap::iterator VxlanRoutingVrfMapper::LrVrfInfoMapIter

A typedef for iterator of LrVrfInfoMap.

Definition at line 312 of file vxlan_routing_manager.h.

A typedef to store map between pointer to VirtualNetwork (a bridge or routing virtual network connected to some LR) and the LR's UUID.

Definition at line 317 of file vxlan_routing_manager.h.

typedef VnLrSet::iterator VxlanRoutingVrfMapper::VnLrSetIter

A typedef for iterator of VnLrSet.

Definition at line 320 of file vxlan_routing_manager.h.

Constructor & Destructor Documentation

VxlanRoutingVrfMapper::VxlanRoutingVrfMapper ( VxlanRoutingManager mgr)

Constructs a new instance of VxlanRoutingVrfMapper using the given pointer to VxlanRoutingManager.

Definition at line 124 of file vxlan_routing_manager.cc.

VxlanRoutingVrfMapper::~VxlanRoutingVrfMapper ( )
virtual

Destroys an instance of VxlanRoutingVrfMapper().

Definition at line 129 of file vxlan_routing_manager.cc.

Member Function Documentation

void VxlanRoutingVrfMapper::BridgeInet4RouteWalkDone ( DBTable::DBTableWalkRef  walk_ref,
DBTableBase partition 
)

Handles completion of route walk in the Inet IPv4 table of a bridge VRF instance.

Definition at line 223 of file vxlan_routing_manager.cc.

void VxlanRoutingVrfMapper::BridgeInet6RouteWalkDone ( DBTable::DBTableWalkRef  walk_ref,
DBTableBase partition 
)

Handles completion of route walk in an Inet IPv6 table of a bridge VRF instance.

Definition at line 236 of file vxlan_routing_manager.cc.

VxlanRoutingVrfMapper::DISALLOW_COPY_AND_ASSIGN ( VxlanRoutingVrfMapper  )
private
const boost::uuids::uuid VxlanRoutingVrfMapper::GetLogicalRouterUuidUsingRoute ( const AgentRoute rt)
private

Find the UUID of the LR using a given route (AgentRoute).

Definition at line 298 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

const VrfEntry * VxlanRoutingVrfMapper::GetRoutingVrfUsingAgentRoute ( const AgentRoute rt)
private

Find the routing VRF instance using a given route (AgentRoute).

Definition at line 284 of file vxlan_routing_manager.cc.

const VrfEntry * VxlanRoutingVrfMapper::GetRoutingVrfUsingUuid ( const boost::uuids::uuid lr_uuid)
private

Find the routing VRF instance using a given LR UUID.

Definition at line 289 of file vxlan_routing_manager.cc.

const VrfEntry * VxlanRoutingVrfMapper::GetRoutingVrfUsingVn ( const VnEntry vn)
private

Find the routing VRF instance using a given virtual network.

Definition at line 275 of file vxlan_routing_manager.cc.

bool VxlanRoutingVrfMapper::IsEmpty ( void  ) const
inline

Determines whether object is empty or not.

Definition at line 357 of file vxlan_routing_manager.h.

void VxlanRoutingVrfMapper::RoutingVrfRouteWalkDone ( DBTable::DBTableWalkRef  walk_ref,
DBTableBase partition 
)

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

Definition at line 217 of file vxlan_routing_manager.cc.

void VxlanRoutingVrfMapper::TryDeleteLogicalRouter ( LrVrfInfoMapIter it)

Attempts to delete the given LR.

Todo:
better way to release logical router from lr_vrf_info_map_ Easier way will be to add logical router in db and trigger delete of this via LR delete in same.

Definition at line 322 of file vxlan_routing_manager.cc.

void VxlanRoutingVrfMapper::WalkBridgeInetTables ( InetUnicastAgentRouteTable inet4,
InetUnicastAgentRouteTable inet6 
)
private

Walks given Inet tables (IPv4 and IPv6).

Definition at line 132 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

void VxlanRoutingVrfMapper::WalkBridgeVrfs ( const RoutedVrfInfo routing_vrf_info)
private

Walks Inet tables of all bridge VRF instances connected to a LR (given in routing_vrf_info parameter).

Definition at line 251 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

void VxlanRoutingVrfMapper::WalkRoutingVrf ( const boost::uuids::uuid lr_uuid,
const VnEntry vn,
bool  update,
bool  withdraw 
)
private

Walks the EVPN table of the routing VRF instance of a given LR.

Definition at line 173 of file vxlan_routing_manager.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class VxlanRoutingManager
friend

Allows access to private members for VxlanRoutingManager class.

Definition at line 365 of file vxlan_routing_manager.h.

Member Data Documentation

InetTableWalker VxlanRoutingVrfMapper::inet4_table_walker_
private

The set of walkers for Inet IPv4 tables of bridge VRF instances.

Definition at line 406 of file vxlan_routing_manager.h.

InetTableWalker VxlanRoutingVrfMapper::inet6_table_walker_
private

The set of walkers for Inet IPv6 tables of bridge VRF instances.

Definition at line 409 of file vxlan_routing_manager.h.

LrVrfInfoMap VxlanRoutingVrfMapper::lr_vrf_info_map_
private

The map between Logical router UUID and RoutedVrfInfo.

Definition at line 398 of file vxlan_routing_manager.h.

VxlanRoutingManager* VxlanRoutingVrfMapper::mgr_
private

A pointer to the VxlanRoutingManager instance.

Definition at line 394 of file vxlan_routing_manager.h.

VnLrSet VxlanRoutingVrfMapper::vn_lr_set_
private

The map between pointer to VirtualNetwork (a bridge or routing virtual network connected to some LR) and the LR's UUID.

Definition at line 403 of file vxlan_routing_manager.h.


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