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

This class represents a partition in the EvpnManager. More...

#include <bgp_evpn.h>

Collaboration diagram for EvpnManagerPartition:

Public Types

typedef EvpnState::SG SG
 
typedef std::map< SG, std::set
< EvpnMcastNode * > > 
EvpnMcastNodeList
 

Public Member Functions

 EvpnManagerPartition (EvpnManager *evpn_manager, size_t part_id)
 
 ~EvpnManagerPartition ()
 
DBTablePartitionGetTablePartition ()
 Get the DBTablePartition for the EvpnTable for our partition id. More...
 
void NotifyNodeRoute (EvpnMcastNode *node)
 Notify the Broadcast MAC route for the given EvpnMcastNode. More...
 
void NotifyReplicatorNodeRoutes ()
 Go through all replicator EvpnMcastNodes and notify associated Broadcast MAC route. More...
 
void NotifyIrClientNodeRoutes (bool exclude_edge_replication_supported)
 Go through all ingress replication client EvpnMcastNodes and notify the associated Broadcast MAC route. More...
 
void AddMcastNode (EvpnMcastNode *node, EvpnRoute *route)
 Add an EvpnMcastNode to the EvpnManagerPartition. More...
 
void DeleteMcastNode (EvpnMcastNode *node, EvpnRoute *route)
 Delete an EvpnMcastNode from the EvpnManagerPartition. More...
 
void UpdateMcastNode (EvpnMcastNode *node, EvpnRoute *route)
 Update an EvpnMcastNode in the EvpnManagerPartition. Need to remove/add EvpnMcastNode from the replicator, leaf and ir client lists as appropriate. More...
 
bool RemoveMcastNodeFromList (EvpnState::SG &sg, EvpnMcastNode *node, EvpnMcastNodeList *list)
 Delete an EvpnMcastNode from the EvpnManagerPartition. More...
 
void TriggerMacRouteUpdate (EvpnRoute *route)
 Add the given MAC route to the update list. This method gets called either when the MAC route itself changes or when the remote PE list for the EvpnSegment of the MAC route gets updated. More...
 
bool empty () const
 Return true if the EvpnManagerPartition is empty i.e. it has no local or remote EvpnMcastNodes and no MAC routes that need to be updated. More...
 
const EvpnMcastNodeListremote_mcast_node_list () const
 
const EvpnMcastNodeListlocal_mcast_node_list () const
 
const EvpnMcastNodeListleaf_node_list () const
 
EvpnMcastNodeListremote_mcast_node_list ()
 
EvpnMcastNodeListlocal_mcast_node_list ()
 
EvpnMcastNodeListleaf_node_list ()
 
BgpServerserver ()
 Return the BgpServer for the EvpnManagerPartition. More...
 
const EvpnTabletable () const
 Return the EvpnTable for the EvpnManagerPartition. More...
 
size_t part_id () const
 

Private Types

typedef std::set< EvpnRoute * > EvpnRouteList
 

Private Member Functions

bool ProcessMacUpdateList ()
 Process the MAC route update list for this EvpnManagerPartition. More...
 
void DisableMacUpdateProcessing ()
 Disable processing of the update list. For testing only. More...
 
void EnableMacUpdateProcessing ()
 Enable processing of the update list. For testing only. More...
 
EvpnStatePtr GetState (const SG &sg)
 
EvpnStatePtr GetState (const SG &sg) const
 
EvpnStatePtr GetState (EvpnRoute *route)
 
EvpnStatePtr LocateState (EvpnRoute *route)
 
EvpnStatePtr LocateState (const SG &sg)
 
EvpnStatePtr CreateState (const SG &sg)
 
const EvpnState::StatesMapstates () const
 
EvpnState::StatesMapstates ()
 
bool GetForestNodeAddress (ErmVpnRoute *rt, Ip4Address *address) const
 
void NotifyForestNode (EvpnRoute *route, ErmVpnTable *table)
 
 DISALLOW_COPY_AND_ASSIGN (EvpnManagerPartition)
 

Private Attributes

EvpnManagerevpn_manager_
 
size_t part_id_
 
EvpnState::StatesMap states_
 
DBTablePartitiontable_partition_
 
EvpnMcastNodeList local_mcast_node_list_
 
EvpnMcastNodeList remote_mcast_node_list_
 
EvpnMcastNodeList replicator_node_list_
 
EvpnMcastNodeList leaf_node_list_
 
EvpnMcastNodeList regular_node_list_
 
EvpnMcastNodeList ir_client_node_list_
 
EvpnRouteList mac_update_list_
 
boost::scoped_ptr< TaskTriggermac_update_trigger_
 

Friends

class EvpnManager
 
class BgpEvpnManagerTest
 

Detailed Description

This class represents a partition in the EvpnManager.

It is used to keep track of local and remote EvpnMcastNodes that belong to the partition. The partition is determined on the ethernet tag in the IM route.

An EvpnManagerPartition contains a set of MAC routes whose alias paths need to be updated. Entries are added to the list using the TriggerMacRouteUpdate method.

Definition at line 418 of file bgp_evpn.h.

Member Typedef Documentation

typedef std::map<SG, std::set<EvpnMcastNode *> > EvpnManagerPartition::EvpnMcastNodeList

Definition at line 421 of file bgp_evpn.h.

typedef std::set<EvpnRoute *> EvpnManagerPartition::EvpnRouteList
private

Definition at line 495 of file bgp_evpn.h.

Definition at line 420 of file bgp_evpn.h.

Constructor & Destructor Documentation

EvpnManagerPartition::EvpnManagerPartition ( EvpnManager evpn_manager,
size_t  part_id 
)

Definition at line 710 of file bgp_evpn.cc.

Here is the call graph for this function:

EvpnManagerPartition::~EvpnManagerPartition ( )

Definition at line 724 of file bgp_evpn.cc.

Member Function Documentation

void EvpnManagerPartition::AddMcastNode ( EvpnMcastNode node,
EvpnRoute route 
)

Add an EvpnMcastNode to the EvpnManagerPartition.

Definition at line 780 of file bgp_evpn.cc.

Here is the call graph for this function:

EvpnStatePtr EvpnManagerPartition::CreateState ( const SG sg)
private

Definition at line 958 of file bgp_evpn.cc.

void EvpnManagerPartition::DeleteMcastNode ( EvpnMcastNode node,
EvpnRoute route 
)

Delete an EvpnMcastNode from the EvpnManagerPartition.

Definition at line 822 of file bgp_evpn.cc.

Here is the call graph for this function:

void EvpnManagerPartition::DisableMacUpdateProcessing ( )
private

Disable processing of the update list. For testing only.

Definition at line 984 of file bgp_evpn.cc.

EvpnManagerPartition::DISALLOW_COPY_AND_ASSIGN ( EvpnManagerPartition  )
private
bool EvpnManagerPartition::empty ( ) const

Return true if the EvpnManagerPartition is empty i.e. it has no local or remote EvpnMcastNodes and no MAC routes that need to be updated.

Definition at line 1000 of file bgp_evpn.cc.

void EvpnManagerPartition::EnableMacUpdateProcessing ( )
private

Enable processing of the update list. For testing only.

Definition at line 992 of file bgp_evpn.cc.

bool EvpnManagerPartition::GetForestNodeAddress ( ErmVpnRoute rt,
Ip4Address address 
) const
private

Definition at line 932 of file bgp_evpn.cc.

Here is the call graph for this function:

EvpnStatePtr EvpnManagerPartition::GetState ( const SG sg)
private

Definition at line 947 of file bgp_evpn.cc.

EvpnStatePtr EvpnManagerPartition::GetState ( const SG sg) const
private

Definition at line 942 of file bgp_evpn.cc.

EvpnStatePtr EvpnManagerPartition::GetState ( EvpnRoute route)
private

Definition at line 952 of file bgp_evpn.cc.

Here is the call graph for this function:

DBTablePartition * EvpnManagerPartition::GetTablePartition ( )

Get the DBTablePartition for the EvpnTable for our partition id.

Definition at line 733 of file bgp_evpn.cc.

Here is the call graph for this function:

const EvpnMcastNodeList& EvpnManagerPartition::leaf_node_list ( ) const
inline

Definition at line 470 of file bgp_evpn.h.

EvpnMcastNodeList* EvpnManagerPartition::leaf_node_list ( )
inline

Definition at line 479 of file bgp_evpn.h.

const EvpnMcastNodeList& EvpnManagerPartition::local_mcast_node_list ( ) const
inline

Definition at line 467 of file bgp_evpn.h.

EvpnMcastNodeList* EvpnManagerPartition::local_mcast_node_list ( )
inline

Definition at line 476 of file bgp_evpn.h.

EvpnStatePtr EvpnManagerPartition::LocateState ( EvpnRoute route)
private

Definition at line 974 of file bgp_evpn.cc.

Here is the call graph for this function:

EvpnStatePtr EvpnManagerPartition::LocateState ( const SG sg)
private

Definition at line 965 of file bgp_evpn.cc.

Here is the call graph for this function:

void EvpnManagerPartition::NotifyForestNode ( EvpnRoute route,
ErmVpnTable table 
)
private

Definition at line 1484 of file bgp_evpn.cc.

Here is the call graph for this function:

void EvpnManagerPartition::NotifyIrClientNodeRoutes ( bool  exclude_edge_replication_supported)

Go through all ingress replication client EvpnMcastNodes and notify the associated Broadcast MAC route.

Definition at line 762 of file bgp_evpn.cc.

Here is the call graph for this function:

void EvpnManagerPartition::NotifyNodeRoute ( EvpnMcastNode node)

Notify the Broadcast MAC route for the given EvpnMcastNode.

Definition at line 740 of file bgp_evpn.cc.

Here is the call graph for this function:

void EvpnManagerPartition::NotifyReplicatorNodeRoutes ( )

Go through all replicator EvpnMcastNodes and notify associated Broadcast MAC route.

Definition at line 749 of file bgp_evpn.cc.

Here is the call graph for this function:

size_t EvpnManagerPartition::part_id ( ) const
inline

Definition at line 489 of file bgp_evpn.h.

bool EvpnManagerPartition::ProcessMacUpdateList ( )
private

Process the MAC route update list for this EvpnManagerPartition.

Definition at line 894 of file bgp_evpn.cc.

Here is the call graph for this function:

const EvpnMcastNodeList& EvpnManagerPartition::remote_mcast_node_list ( ) const
inline

Definition at line 464 of file bgp_evpn.h.

EvpnMcastNodeList* EvpnManagerPartition::remote_mcast_node_list ( )
inline

Definition at line 473 of file bgp_evpn.h.

bool EvpnManagerPartition::RemoveMcastNodeFromList ( EvpnState::SG sg,
EvpnMcastNode node,
EvpnMcastNodeList list 
)

Delete an EvpnMcastNode from the EvpnManagerPartition.

Definition at line 807 of file bgp_evpn.cc.

BgpServer * EvpnManagerPartition::server ( )

Return the BgpServer for the EvpnManagerPartition.

Definition at line 1017 of file bgp_evpn.cc.

Here is the call graph for this function:

const EvpnState::StatesMap& EvpnManagerPartition::states ( ) const
inlineprivate

Definition at line 514 of file bgp_evpn.h.

EvpnState::StatesMap& EvpnManagerPartition::states ( )
inlineprivate

Definition at line 515 of file bgp_evpn.h.

const EvpnTable * EvpnManagerPartition::table ( ) const

Return the EvpnTable for the EvpnManagerPartition.

Definition at line 1024 of file bgp_evpn.cc.

Here is the call graph for this function:

void EvpnManagerPartition::TriggerMacRouteUpdate ( EvpnRoute route)

Add the given MAC route to the update list. This method gets called either when the MAC route itself changes or when the remote PE list for the EvpnSegment of the MAC route gets updated.

Definition at line 884 of file bgp_evpn.cc.

void EvpnManagerPartition::UpdateMcastNode ( EvpnMcastNode node,
EvpnRoute route 
)

Update an EvpnMcastNode in the EvpnManagerPartition. Need to remove/add EvpnMcastNode from the replicator, leaf and ir client lists as appropriate.

Definition at line 850 of file bgp_evpn.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class BgpEvpnManagerTest
friend

Definition at line 493 of file bgp_evpn.h.

friend class EvpnManager
friend

Definition at line 492 of file bgp_evpn.h.

Member Data Documentation

EvpnManager* EvpnManagerPartition::evpn_manager_
private

Definition at line 519 of file bgp_evpn.h.

EvpnMcastNodeList EvpnManagerPartition::ir_client_node_list_
private

Definition at line 528 of file bgp_evpn.h.

EvpnMcastNodeList EvpnManagerPartition::leaf_node_list_
private

Definition at line 526 of file bgp_evpn.h.

EvpnMcastNodeList EvpnManagerPartition::local_mcast_node_list_
private

Definition at line 523 of file bgp_evpn.h.

EvpnRouteList EvpnManagerPartition::mac_update_list_
private

Definition at line 529 of file bgp_evpn.h.

boost::scoped_ptr<TaskTrigger> EvpnManagerPartition::mac_update_trigger_
private

Definition at line 530 of file bgp_evpn.h.

size_t EvpnManagerPartition::part_id_
private

Definition at line 520 of file bgp_evpn.h.

EvpnMcastNodeList EvpnManagerPartition::regular_node_list_
private

Definition at line 527 of file bgp_evpn.h.

EvpnMcastNodeList EvpnManagerPartition::remote_mcast_node_list_
private

Definition at line 524 of file bgp_evpn.h.

EvpnMcastNodeList EvpnManagerPartition::replicator_node_list_
private

Definition at line 525 of file bgp_evpn.h.

EvpnState::StatesMap EvpnManagerPartition::states_
private

Definition at line 521 of file bgp_evpn.h.

DBTablePartition* EvpnManagerPartition::table_partition_
private

Definition at line 521 of file bgp_evpn.h.


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