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

#include <evpn_table.h>

Inheritance diagram for EvpnTable:
Collaboration diagram for EvpnTable:

Classes

struct  RequestKey
 

Public Member Functions

 EvpnTable (DB *db, const std::string &name)
 
virtual std::unique_ptr< DBEntryAllocEntry (const DBRequestKey *key) const
 
virtual std::unique_ptr< DBEntryAllocEntryStr (const std::string &key) const
 
virtual void AddRemoveCallback (const DBEntryBase *entry, bool add) const
 
virtual Address::Family family () const
 
bool IsMaster () const
 
virtual bool IsVpnTable () const
 
virtual size_t Hash (const DBEntry *entry) const
 
virtual size_t Hash (const DBRequestKey *key) const
 
virtual BgpRouteRouteReplicate (BgpServer *server, BgpTable *src_table, BgpRoute *src_rt, const BgpPath *path, ExtCommunityPtr ptr)
 
virtual bool Export (RibOut *ribout, Route *route, const RibPeerSet &peerset, UpdateInfoSList &info_slist)
 
virtual PathResolverCreatePathResolver ()
 
EvpnRouteFindRoute (const EvpnPrefix &prefix)
 
const EvpnRouteFindRoute (const EvpnPrefix &prefix) const
 
void CreateEvpnManager ()
 
void DestroyEvpnManager ()
 
EvpnManagerGetEvpnManager ()
 
const EvpnManagerGetEvpnManager () const
 
virtual void set_routing_instance (RoutingInstance *rtinstance)
 
uint64_t mac_route_count () const
 
uint64_t unique_mac_route_count () const
 
uint64_t im_route_count () const
 
uint64_t ip_route_count () const
 
- Public Member Functions inherited from BgpTable
 BgpTable (DB *db, const std::string &name)
 
 ~BgpTable ()
 
const RibOutMapribout_map ()
 
RibOutRibOutFind (const RibExportPolicy &policy)
 
RibOutRibOutLocate (BgpUpdateSender *sender, const RibExportPolicy &policy)
 
void RibOutDelete (const RibExportPolicy &policy)
 
virtual bool IsRoutingPolicySupported () const
 
virtual bool IsRouteAggregationSupported () const
 
void CheckAggregatorAttr (BgpAttr *attr) const
 
void CreateAsPath4Byte (BgpAttr *attr, as_t local_as) const
 
void CreateAsPath2Byte (BgpAttr *attr) const
 
void CreateAs4Path (BgpAttr *attr) const
 
bool Has4ByteAsn (BgpAttr *attr) const
 
void PrependAsToAsPath4Byte (BgpAttr *attr, as_t asn) const
 
void PrependAsToAsPath2Byte (BgpAttr *attr, as_t asn) const
 
void PrependAsToAsPath2Byte (BgpAttr *attr, as2_t asn) const
 
void PrependAsToAs4Path (BgpAttr *attr, as_t asn) const
 
UpdateInfoGetUpdateInfo (RibOut *ribout, BgpRoute *route, const RibPeerSet &peerset)
 
void ProcessDefaultTunnelEncapsulation (const RibOut *ribout, ExtCommunityDB *extcomm_db, BgpAttr *attr) const
 
virtual void UpdateSecondaryTablesForReplication (BgpRoute *rt, TableSet *secondary_tables)
 
void ManagedDelete ()
 
virtual void RetryDelete ()
 
void Shutdown ()
 
virtual bool MayDelete () const
 
bool IsDeleted () const
 
void LocatePathResolver ()
 
void DestroyPathResolver ()
 
RoutingInstancerouting_instance ()
 
const RoutingInstancerouting_instance () const
 
BgpServerserver ()
 
const BgpServerserver () const
 
PathResolverpath_resolver ()
 
const PathResolverpath_resolver () const
 
LifetimeActordeleter ()
 
const LifetimeActordeleter () const
 
size_t GetPendingRiboutsCount (size_t *markers) const
 
void UpdatePathCount (const BgpPath *path, int count)
 
const uint64_t GetPrimaryPathCount () const
 
const uint64_t GetSecondaryPathCount () const
 
const uint64_t GetInfeasiblePathCount () const
 
const uint64_t GetStalePathCount () const
 
const uint64_t GetLlgrStalePathCount () const
 
void UpdateStalePathCount (int count)
 
void UpdateLlgrStalePathCount (int count)
 
bool IsAggregateRoute (const BgpRoute *route) const
 
bool IsContributingRoute (const BgpRoute *route) const
 
bool DeletePath (DBTablePartBase *root, BgpRoute *rt, BgpPath *path)
 
virtual void Input (DBTablePartition *root, DBClient *client, DBRequest *req)
 
bool InputCommon (DBTablePartBase *root, BgpRoute *rt, BgpPath *path, const IPeer *peer, DBRequest *req, DBRequest::DBOperation oper, BgpAttrPtr attrs, uint32_t path_id, uint32_t flags, uint32_t label, uint32_t l3_label)
 
void InputCommonPostProcess (DBTablePartBase *root, BgpRoute *rt, bool notify_rt)
 
void FillRibOutStatisticsInfo (std::vector< ShowRibOutStatistics > *sros_list) const
 
virtual BgpAttrPtr GetAttributes (BgpRoute *rt, BgpAttrPtr attrp, const IPeer *peer)
 
- Public Member Functions inherited from RouteTable
 RouteTable (DB *db, const std::string &name)
 
- Public Member Functions inherited from DBTable
 DBTable (DB *db, const std::string &name)
 
virtual ~DBTable ()
 
void Init ()
 
virtual DBTablePartitionAllocPartition (int index)
 
virtual DBEntryAdd (const DBRequest *req)
 
virtual bool OnChange (DBEntry *entry, const DBRequest *req)
 
virtual bool Delete (DBEntry *entry, const DBRequest *req)
 
void NotifyAllEntries ()
 
DBEntryFind (const DBEntry *entry)
 
const DBEntryFind (const DBEntry *entry) const
 
DBEntryFind (const DBRequestKey *key, int id=-1)
 
const DBEntryFind (const DBRequestKey *key, int id=-1) const
 
DBEntryFindNoLock (const DBEntry *entry)
 
DBEntryFindNoLock (const DBRequestKey *key)
 
virtual DBTablePartBaseGetTablePartition (const DBRequestKey *key)
 
virtual const DBTablePartBaseGetTablePartition (const DBRequestKey *key) const
 
virtual DBTablePartBaseGetTablePartition (const DBEntryBase *entry)
 
virtual const DBTablePartBaseGetTablePartition (const DBEntryBase *entry) const
 
virtual DBTablePartBaseGetTablePartition (const int index)
 
virtual const DBTablePartBaseGetTablePartition (const int index) const
 
virtual void Change (DBEntryBase *entry)
 
virtual int PartitionCount () const
 
virtual size_t Size () const
 
DBTableWalkRef AllocWalker (WalkFn walk_fn, WalkCompleteFn walk_complete)
 
void ReleaseWalker (DBTableWalkRef &walk)
 
void WalkTable (DBTableWalkRef walk)
 
void WalkAgain (DBTableWalkRef walk)
 
void SetWalkIterationToYield (int count)
 
int GetWalkIterationToYield ()
 
void SetWalkTaskId (int task_id)
 
int GetWalkerTaskId ()
 
- Public Member Functions inherited from DBTableBase
 DBTableBase (DB *db, const std::string &name)
 
virtual ~DBTableBase ()
 
bool Enqueue (DBRequest *req)
 
void EnqueueRemove (DBEntryBase *db_entry)
 
ListenerId Register (ChangeCallback callback, const std::string &name="unspecified")
 
void Unregister (ListenerId listener)
 
void RunNotify (DBTablePartBase *tpart, DBEntryBase *entry)
 
void AddToDBStateCount (ListenerId listener, int count)
 
uint64_t GetDBStateCount (ListenerId listener)
 
bool empty () const
 
DBdatabase ()
 
const DBdatabase () const
 
const std::string & name () const
 
bool HasListeners () const
 
size_t GetListenerCount () const
 
void FillListeners (std::vector< ShowTableListener > *listeners) const
 
uint64_t enqueue_count () const
 
void incr_enqueue_count ()
 
void reset_enqueue_count ()
 
uint64_t input_count () const
 
void incr_input_count ()
 
void reset_input_count ()
 
uint64_t notify_count () const
 
void incr_notify_count ()
 
void reset_notify_count ()
 
bool HasWalkers () const
 
uint64_t walker_count () const
 
void incr_walker_count ()
 
uint64_t decr_walker_count ()
 
uint64_t walk_request_count () const
 
uint64_t walk_complete_count () const
 
uint64_t walk_cancel_count () const
 
uint64_t walk_again_count () const
 
uint64_t walk_count () const
 
void incr_walk_request_count ()
 
void incr_walk_complete_count ()
 
void incr_walk_cancel_count ()
 
void incr_walk_again_count ()
 
void incr_walk_count ()
 

Static Public Member Functions

static size_t HashFunction (const EvpnPrefix &prefix)
 
static DBTableBaseCreateTable (DB *db, const std::string &name)
 
- Static Public Member Functions inherited from BgpTable
static bool PathSelection (const Path &path1, const Path &path2)
 
- Static Public Member Functions inherited from DBTable
static void DBStateClear (DBTable *table, ListenerId id)
 

Private Member Functions

virtual BgpRouteTableFind (DBTablePartition *rtp, const DBRequestKey *prefix)
 
bool ShouldReplicate (const BgpServer *server, const BgpTable *src_table, const ExtCommunityPtr community, const EvpnPrefix &evpn_prefix) const
 
 DISALLOW_COPY_AND_ASSIGN (EvpnTable)
 

Private Attributes

EvpnManagerevpn_manager_
 
tbb::atomic< uint64_t > mac_route_count_
 
tbb::atomic< uint64_t > unique_mac_route_count_
 
tbb::atomic< uint64_t > im_route_count_
 
tbb::atomic< uint64_t > ip_route_count_
 

Additional Inherited Members

- Public Types inherited from BgpTable
typedef std::map
< RibExportPolicy, RibOut * > 
RibOutMap
 
typedef std::set< BgpTable * > TableSet
 
- Public Types inherited from DBTable
typedef boost::intrusive_ptr
< DBTableWalk
DBTableWalkRef
 
typedef boost::function< bool(DBTablePartBase
*, DBEntryBase *)> 
WalkFn
 
typedef boost::function< void(DBTableWalkRef,
DBTableBase *)> 
WalkCompleteFn
 
- Public Types inherited from DBTableBase
typedef boost::function< void(DBTablePartBase
*, DBEntryBase *)> 
ChangeCallback
 
typedef int ListenerId
 
- Static Public Attributes inherited from DBTable
static const int kIterationToYield = 256
 
- Static Public Attributes inherited from DBTableBase
static const int kInvalidId = -1
 

Detailed Description

Definition at line 17 of file evpn_table.h.

Constructor & Destructor Documentation

EvpnTable::EvpnTable ( DB db,
const std::string &  name 
)

Definition at line 39 of file evpn_table.cc.

Member Function Documentation

void EvpnTable::AddRemoveCallback ( const DBEntryBase entry,
bool  add 
) const
virtual

Reimplemented from DBTableBase.

Definition at line 59 of file evpn_table.cc.

Here is the call graph for this function:

unique_ptr< DBEntry > EvpnTable::AllocEntry ( const DBRequestKey key) const
virtual

Implements DBTable.

Definition at line 47 of file evpn_table.cc.

unique_ptr< DBEntry > EvpnTable::AllocEntryStr ( const std::string &  key) const
virtual

Implements BgpTable.

Definition at line 53 of file evpn_table.cc.

Here is the call graph for this function:

void EvpnTable::CreateEvpnManager ( )

Definition at line 345 of file evpn_table.cc.

Here is the call graph for this function:

PathResolver * EvpnTable::CreatePathResolver ( )
virtual

Reimplemented from BgpTable.

Definition at line 127 of file evpn_table.cc.

Here is the call graph for this function:

DBTableBase * EvpnTable::CreateTable ( DB db,
const std::string &  name 
)
static

Definition at line 133 of file evpn_table.cc.

Here is the call graph for this function:

void EvpnTable::DestroyEvpnManager ( )

Definition at line 353 of file evpn_table.cc.

Here is the call graph for this function:

EvpnTable::DISALLOW_COPY_AND_ASSIGN ( EvpnTable  )
private
bool EvpnTable::Export ( RibOut ribout,
Route route,
const RibPeerSet peerset,
UpdateInfoSList info_slist 
)
virtual

Implements BgpTable.

Definition at line 296 of file evpn_table.cc.

Here is the call graph for this function:

virtual Address::Family EvpnTable::family ( ) const
inlinevirtual

Implements BgpTable.

Definition at line 34 of file evpn_table.h.

EvpnRoute * EvpnTable::FindRoute ( const EvpnPrefix prefix)

Definition at line 140 of file evpn_table.cc.

Here is the call graph for this function:

const EvpnRoute * EvpnTable::FindRoute ( const EvpnPrefix prefix) const

Definition at line 147 of file evpn_table.cc.

Here is the call graph for this function:

EvpnManager * EvpnTable::GetEvpnManager ( )

Definition at line 360 of file evpn_table.cc.

const EvpnManager * EvpnTable::GetEvpnManager ( ) const

Definition at line 364 of file evpn_table.cc.

size_t EvpnTable::Hash ( const DBEntry entry) const
virtual

Reimplemented from DBTable.

Definition at line 114 of file evpn_table.cc.

Here is the call graph for this function:

size_t EvpnTable::Hash ( const DBRequestKey key) const
virtual

Reimplemented from DBTable.

Definition at line 108 of file evpn_table.cc.

Here is the call graph for this function:

size_t EvpnTable::HashFunction ( const EvpnPrefix prefix)
static

Definition at line 21 of file evpn_table.cc.

Here is the call graph for this function:

uint64_t EvpnTable::im_route_count ( ) const
inline

Definition at line 64 of file evpn_table.h.

uint64_t EvpnTable::ip_route_count ( ) const
inline

Definition at line 65 of file evpn_table.h.

bool EvpnTable::IsMaster ( ) const

Definition at line 373 of file evpn_table.cc.

Here is the call graph for this function:

virtual bool EvpnTable::IsVpnTable ( ) const
inlinevirtual

Reimplemented from BgpTable.

Definition at line 36 of file evpn_table.h.

Here is the call graph for this function:

uint64_t EvpnTable::mac_route_count ( ) const
inline

Definition at line 62 of file evpn_table.h.

BgpRoute * EvpnTable::RouteReplicate ( BgpServer server,
BgpTable src_table,
BgpRoute src_rt,
const BgpPath path,
ExtCommunityPtr  ptr 
)
virtual

Implements BgpTable.

Definition at line 194 of file evpn_table.cc.

Here is the call graph for this function:

void EvpnTable::set_routing_instance ( RoutingInstance rtinstance)
virtual

Reimplemented from BgpTable.

Definition at line 368 of file evpn_table.cc.

Here is the call graph for this function:

bool EvpnTable::ShouldReplicate ( const BgpServer server,
const BgpTable src_table,
const ExtCommunityPtr  community,
const EvpnPrefix evpn_prefix 
) const
private

Definition at line 154 of file evpn_table.cc.

Here is the call graph for this function:

BgpRoute * EvpnTable::TableFind ( DBTablePartition rtp,
const DBRequestKey prefix 
)
privatevirtual

Implements BgpTable.

Definition at line 120 of file evpn_table.cc.

Here is the call graph for this function:

uint64_t EvpnTable::unique_mac_route_count ( ) const
inline

Definition at line 63 of file evpn_table.h.

Member Data Documentation

EvpnManager* EvpnTable::evpn_manager_
private

Definition at line 73 of file evpn_table.h.

tbb::atomic<uint64_t> EvpnTable::im_route_count_
mutableprivate

Definition at line 76 of file evpn_table.h.

tbb::atomic<uint64_t> EvpnTable::ip_route_count_
mutableprivate

Definition at line 77 of file evpn_table.h.

tbb::atomic<uint64_t> EvpnTable::mac_route_count_
mutableprivate

Definition at line 74 of file evpn_table.h.

tbb::atomic<uint64_t> EvpnTable::unique_mac_route_count_
mutableprivate

Definition at line 75 of file evpn_table.h.


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