OpenSDN source code
|
This class represents a partition in the EvpnManager. More...
#include <bgp_evpn.h>
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 () | |
DBTablePartition * | GetTablePartition () |
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 EvpnMcastNodeList & | remote_mcast_node_list () const |
const EvpnMcastNodeList & | local_mcast_node_list () const |
const EvpnMcastNodeList & | leaf_node_list () const |
EvpnMcastNodeList * | remote_mcast_node_list () |
EvpnMcastNodeList * | local_mcast_node_list () |
EvpnMcastNodeList * | leaf_node_list () |
BgpServer * | server () |
Return the BgpServer for the EvpnManagerPartition. More... | |
const EvpnTable * | table () 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::StatesMap & | states () const |
EvpnState::StatesMap & | states () |
bool | GetForestNodeAddress (ErmVpnRoute *rt, Ip4Address *address) const |
void | NotifyForestNode (EvpnRoute *route, ErmVpnTable *table) |
DISALLOW_COPY_AND_ASSIGN (EvpnManagerPartition) | |
Friends | |
class | EvpnManager |
class | BgpEvpnManagerTest |
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.
typedef std::map<SG, std::set<EvpnMcastNode *> > EvpnManagerPartition::EvpnMcastNodeList |
Definition at line 421 of file bgp_evpn.h.
|
private |
Definition at line 495 of file bgp_evpn.h.
Definition at line 420 of file bgp_evpn.h.
EvpnManagerPartition::EvpnManagerPartition | ( | EvpnManager * | evpn_manager, |
size_t | part_id | ||
) |
EvpnManagerPartition::~EvpnManagerPartition | ( | ) |
Definition at line 724 of file bgp_evpn.cc.
void EvpnManagerPartition::AddMcastNode | ( | EvpnMcastNode * | node, |
EvpnRoute * | route | ||
) |
Add an EvpnMcastNode to the EvpnManagerPartition.
Definition at line 780 of file bgp_evpn.cc.
|
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.
|
private |
Disable processing of the update list. For testing only.
Definition at line 984 of file bgp_evpn.cc.
|
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.
|
private |
Enable processing of the update list. For testing only.
Definition at line 992 of file bgp_evpn.cc.
|
private |
|
private |
Definition at line 947 of file bgp_evpn.cc.
|
private |
Definition at line 942 of file bgp_evpn.cc.
|
private |
DBTablePartition * EvpnManagerPartition::GetTablePartition | ( | ) |
Get the DBTablePartition for the EvpnTable for our partition id.
Definition at line 733 of file bgp_evpn.cc.
|
inline |
Definition at line 470 of file bgp_evpn.h.
|
inline |
Definition at line 479 of file bgp_evpn.h.
|
inline |
Definition at line 467 of file bgp_evpn.h.
|
inline |
Definition at line 476 of file bgp_evpn.h.
|
private |
|
private |
|
private |
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.
void EvpnManagerPartition::NotifyNodeRoute | ( | EvpnMcastNode * | node | ) |
Notify the Broadcast MAC route for the given EvpnMcastNode.
Definition at line 740 of file bgp_evpn.cc.
void EvpnManagerPartition::NotifyReplicatorNodeRoutes | ( | ) |
Go through all replicator EvpnMcastNodes and notify associated Broadcast MAC route.
Definition at line 749 of file bgp_evpn.cc.
|
inline |
Definition at line 489 of file bgp_evpn.h.
|
private |
Process the MAC route update list for this EvpnManagerPartition.
Definition at line 894 of file bgp_evpn.cc.
|
inline |
Definition at line 464 of file bgp_evpn.h.
|
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.
|
inlineprivate |
Definition at line 514 of file bgp_evpn.h.
|
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.
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.
|
friend |
Definition at line 493 of file bgp_evpn.h.
|
friend |
Definition at line 492 of file bgp_evpn.h.
|
private |
Definition at line 519 of file bgp_evpn.h.
|
private |
Definition at line 528 of file bgp_evpn.h.
|
private |
Definition at line 526 of file bgp_evpn.h.
|
private |
Definition at line 523 of file bgp_evpn.h.
|
private |
Definition at line 529 of file bgp_evpn.h.
|
private |
Definition at line 530 of file bgp_evpn.h.
|
private |
Definition at line 520 of file bgp_evpn.h.
|
private |
Definition at line 527 of file bgp_evpn.h.
|
private |
Definition at line 524 of file bgp_evpn.h.
|
private |
Definition at line 525 of file bgp_evpn.h.
|
private |
Definition at line 521 of file bgp_evpn.h.
|
private |
Definition at line 521 of file bgp_evpn.h.