OpenSDN source code
|
This class holds Evpn state for a particular <S,G> at any given time. More...
#include <bgp_evpn.h>
Classes | |
struct | SG |
Simple structure to hold <S,G>. Source as "0.0.0.0" can be used to encode <*,G> as well. More... | |
Public Types | |
typedef std::set< EvpnRoute * > | RoutesSet |
typedef std::map< EvpnRoute *, BgpAttrPtr > | RoutesMap |
typedef std::map< SG, EvpnState * > | StatesMap |
Public Member Functions | |
EvpnState (const SG &sg, StatesMap *states, EvpnManager *manager) | |
A global MVPN state for a given <S.G> within a EvpnProjectManager. More... | |
virtual | ~EvpnState () |
const SG & | sg () const |
ErmVpnRoute * | global_ermvpn_tree_rt () |
const ErmVpnRoute * | global_ermvpn_tree_rt () const |
void | set_global_ermvpn_tree_rt (ErmVpnRoute *global_ermvpn_tree_rt) |
RoutesSet & | smet_routes () |
const RoutesSet & | smet_routes () const |
const StatesMap * | states () const |
StatesMap * | states () |
EvpnManager * | manager () |
const EvpnManager * | manager () const |
int | refcount () const |
Private Member Functions | |
const ErmVpnTable * | table () const |
DISALLOW_COPY_AND_ASSIGN (EvpnState) | |
Private Attributes | |
SG | sg_ |
ErmVpnRoute * | global_ermvpn_tree_rt_ |
RoutesSet | smet_routes_ |
StatesMap * | states_ |
EvpnManager * | manager_ |
tbb::atomic< int > | refcount_ |
Friends | |
class | EvpnMcastNode |
class | EvpnManagerPartition |
void | intrusive_ptr_add_ref (EvpnState *evpn_state) |
Increment refcont atomically. More... | |
void | intrusive_ptr_release (EvpnState *evpn_state) |
Decrement refcount of an evpn_state. If the refcount falls to 1, it implies that there is no more reference to this particular state from any other data structure. Hence, it can be deleted from the container map and destroyed as well. More... | |
This class holds Evpn state for a particular <S,G> at any given time.
In Evpn state machinery, different types of routes are sent and received at different phases of processing. This class holds all relevant information associated with an <S,G>.
This is a refcounted class which is referred by DB States of different routes. When the refcount reaches 0, (last referring db state is deleted), this object is deleted from the container map and then destroyed.
global_ermvpn_tree_rt_ This is a reference to GlobalErmVpnRoute associated with the ErmVpnTree used in the data plane for this <S,G>. This route is created/updated when ErmVpn notifies changes to ermvpn routes.
states_ This is the parent map that holds 'this' EvpnState pointer as the value for the associated SG key. When the refcount reaches zero, it indicates that there is no reference to this state from of the DB States associated with any Evpn route. Hence at that time, this state is removed this map states_ and destroyed. This map actually sits inside the associated EvpnProjectManagerParitition object.
Definition at line 347 of file bgp_evpn.h.
typedef std::map<EvpnRoute *, BgpAttrPtr> EvpnState::RoutesMap |
Definition at line 350 of file bgp_evpn.h.
typedef std::set<EvpnRoute *> EvpnState::RoutesSet |
Definition at line 349 of file bgp_evpn.h.
typedef std::map<SG, EvpnState *> EvpnState::StatesMap |
Definition at line 365 of file bgp_evpn.h.
EvpnState::EvpnState | ( | const SG & | sg, |
StatesMap * | states, | ||
EvpnManager * | manager | ||
) |
A global MVPN state for a given <S.G> within a EvpnProjectManager.
Definition at line 34 of file bgp_evpn.cc.
|
virtual |
Definition at line 40 of file bgp_evpn.cc.
|
private |
ErmVpnRoute * EvpnState::global_ermvpn_tree_rt | ( | ) |
Definition at line 1759 of file bgp_evpn.cc.
const ErmVpnRoute * EvpnState::global_ermvpn_tree_rt | ( | ) | const |
Definition at line 1763 of file bgp_evpn.cc.
|
inline |
Definition at line 379 of file bgp_evpn.h.
|
inline |
Definition at line 380 of file bgp_evpn.h.
|
inline |
Definition at line 381 of file bgp_evpn.h.
void EvpnState::set_global_ermvpn_tree_rt | ( | ErmVpnRoute * | global_ermvpn_tree_rt | ) |
const EvpnState::SG & EvpnState::sg | ( | ) | const |
Definition at line 1751 of file bgp_evpn.cc.
|
inline |
Definition at line 375 of file bgp_evpn.h.
|
inline |
Definition at line 376 of file bgp_evpn.h.
|
inline |
Definition at line 377 of file bgp_evpn.h.
|
inline |
Definition at line 378 of file bgp_evpn.h.
|
private |
|
friend |
Definition at line 385 of file bgp_evpn.h.
|
friend |
Definition at line 384 of file bgp_evpn.h.
|
friend |
Increment refcont atomically.
Definition at line 759 of file bgp_evpn.h.
|
friend |
Decrement refcount of an evpn_state. If the refcount falls to 1, it implies that there is no more reference to this particular state from any other data structure. Hence, it can be deleted from the container map and destroyed as well.
Definition at line 767 of file bgp_evpn.h.
|
private |
Definition at line 399 of file bgp_evpn.h.
|
private |
Definition at line 402 of file bgp_evpn.h.
|
private |
Definition at line 403 of file bgp_evpn.h.
|
private |
Definition at line 398 of file bgp_evpn.h.
|
private |
Definition at line 400 of file bgp_evpn.h.
|
private |
Definition at line 401 of file bgp_evpn.h.