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

#include <mpls.h>

Inheritance diagram for MplsTable:
Collaboration diagram for MplsTable:

Public Member Functions

 MplsTable (DB *db, const std::string &name)
 
virtual ~MplsTable ()
 
virtual void Process (DBRequest &req)
 
virtual size_t Hash (const DBEntry *entry) const
 
virtual size_t Hash (const DBRequestKey *key) const
 
virtual std::unique_ptr< DBEntryAllocEntry (const DBRequestKey *k) const
 
virtual DBEntryAdd (const DBRequest *req)
 
virtual bool OnChange (DBEntry *entry, const DBRequest *req)
 
virtual bool Delete (DBEntry *entry, const DBRequest *req)
 
virtual void OnZeroRefcount (AgentDBEntry *e)
 
virtual AgentSandeshPtr GetAgentSandesh (const AgentSandeshArguments *args, const std::string &context)
 
uint32_t CreateRouteLabel (uint32_t label, const NextHopKey *nh_key, const std::string &vrf_name, const std::string &route)
 
void ReserveLabel (uint32_t start, uint32_t end)
 
void FreeReserveLabel (uint32_t start, uint32_t end)
 
MplsLabelAllocLabel (const NextHopKey *nh_key)
 
uint32_t AllocLabel (ResourceManager::KeyPtr key)
 
void FreeLabel (uint32_t label)
 
void FreeLabel (uint32_t label, const std::string &vrf_name)
 
void ReserveMulticastLabel (uint32_t start, uint32_t end, uint8_t idx)
 
bool IsFabricMulticastLabel (uint32_t label) const
 
MplsLabelFindMplsLabel (uint32_t label)
 
void CheckVrLabelLimit ()
 
uint32_t LabelIndexCount ()
 
void FreeMplsLabelIndex (size_t label)
 
- Public Member Functions inherited from AgentDBTable
 AgentDBTable (DB *db, const std::string &name)
 
 AgentDBTable (DB *db, const std::string &name, bool del_on_zero_refcount)
 
virtual ~AgentDBTable ()
 
virtual int PartitionCount () const
 
virtual void Input (DBTablePartition *root, DBClient *client, DBRequest *req)
 
virtual DBEntryCfgAdd (DBRequest *req)
 
virtual bool Resync (DBEntry *entry, const DBRequest *req)
 
virtual void Clear ()
 
virtual bool IFNodeToReq (IFMapNode *node, DBRequest &req, const boost::uuids::uuid &uuid)
 
virtual bool IFLinkToReq (IFMapLink *link, IFMapNode *node, const std::string &peer_name, IFMapNode *peer, DBRequest &req)
 
virtual bool IFNodeToUuid (IFMapNode *node, boost::uuids::uuid &id)
 
virtual DBTablePartitionAllocPartition (int index)
 
virtual void NotifyEntry (DBEntryBase *entry)
 
void Notify (DBTablePartBase *partition, DBEntryBase *entry)
 
DBTableBase::ListenerId GetRefListenerId () const
 
AgentDBEntryFindActiveEntry (const DBEntry *key)
 
AgentDBEntryFindActiveEntryNoLock (const DBEntry *key)
 
AgentDBEntryFindActiveEntry (const DBRequestKey *key)
 
AgentDBEntryFindActiveEntryNoLock (const DBRequestKey *key)
 
AgentDBEntryFind (const DBEntry *key, bool ret_del)
 
AgentDBEntryFind (const DBRequestKey *key, bool ret_del)
 
virtual bool CanNotify (IFMapNode *dbe)
 
virtual bool ProcessConfig (IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
 
void set_agent (Agent *agent)
 
Agentagent () const
 
void Flush ()
 
void reset_flush_walk_ref ()
 
SandeshTraceBufferPtr GetOperDBTraceBuf () const
 
- Public Member Functions inherited from DBTable
 DBTable (DB *db, const std::string &name)
 
virtual ~DBTable ()
 
void Init ()
 
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 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)
 
virtual void AddRemoveCallback (const DBEntryBase *entry, bool add) const
 
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
 
virtual void RetryDelete ()
 
virtual bool MayDelete () 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 DBTableBaseCreateTable (DB *db, const std::string &name)
 
- Static Public Member Functions inherited from DBTable
static void DBStateClear (DBTable *table, ListenerId id)
 

Static Public Attributes

static const uint32_t kInvalidLabel = 0xFFFFFFFF
 
static const uint32_t kInvalidExportLabel = 0
 
static const uint32_t kStartLabel = 16
 
static const uint32_t kDpdkShiftBits = 4
 
static const uint32_t kImplicitNullLabel = 3
 
- Static Public Attributes inherited from AgentDBTable
static const int kPartitionCount = 1
 
- Static Public Attributes inherited from DBTable
static const int kIterationToYield = 256
 
- Static Public Attributes inherited from DBTableBase
static const int kInvalidId = -1
 

Private Member Functions

bool ChangeHandler (MplsLabel *mpls, const DBRequest *req)
 
 DISALLOW_COPY_AND_ASSIGN (MplsTable)
 

Private Attributes

IndexVector< MplsLabel * > label_table_
 
uint32_t multicast_label_start_ [MAX_XMPP_SERVERS]
 
uint32_t multicast_label_end_ [MAX_XMPP_SERVERS]
 

Additional Inherited Members

- 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
 

Detailed Description

Definition at line 99 of file mpls.h.

Constructor & Destructor Documentation

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

Definition at line 235 of file mpls.cc.

MplsTable::~MplsTable ( )
virtual

Definition at line 239 of file mpls.cc.

Member Function Documentation

DBEntry * MplsTable::Add ( const DBRequest req)
virtual

Reimplemented from DBTable.

Definition at line 290 of file mpls.cc.

Here is the call graph for this function:

std::unique_ptr< DBEntry > MplsTable::AllocEntry ( const DBRequestKey k) const
virtual

Implements DBTable.

Definition at line 284 of file mpls.cc.

Here is the call graph for this function:

MplsLabel * MplsTable::AllocLabel ( const NextHopKey nh_key)

Definition at line 405 of file mpls.cc.

Here is the call graph for this function:

uint32_t MplsTable::AllocLabel ( ResourceManager::KeyPtr  key)

Definition at line 259 of file mpls.cc.

Here is the call graph for this function:

bool MplsTable::ChangeHandler ( MplsLabel mpls,
const DBRequest req 
)
private
void MplsTable::CheckVrLabelLimit ( )

Definition at line 443 of file mpls.cc.

Here is the call graph for this function:

uint32_t MplsTable::CreateRouteLabel ( uint32_t  label,
const NextHopKey nh_key,
const std::string &  vrf_name,
const std::string &  route 
)

Definition at line 341 of file mpls.cc.

Here is the call graph for this function:

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

Definition at line 242 of file mpls.cc.

Here is the call graph for this function:

bool MplsTable::Delete ( DBEntry entry,
const DBRequest req 
)
virtual

Reimplemented from DBTable.

Definition at line 306 of file mpls.cc.

Here is the call graph for this function:

MplsTable::DISALLOW_COPY_AND_ASSIGN ( MplsTable  )
private
MplsLabel * MplsTable::FindMplsLabel ( uint32_t  label)

Definition at line 399 of file mpls.cc.

Here is the call graph for this function:

void MplsTable::FreeLabel ( uint32_t  label)

Definition at line 267 of file mpls.cc.

void MplsTable::FreeLabel ( uint32_t  label,
const std::string &  vrf_name 
)

Definition at line 271 of file mpls.cc.

Here is the call graph for this function:

void MplsTable::FreeMplsLabelIndex ( size_t  label)
inline

Definition at line 138 of file mpls.h.

Here is the call graph for this function:

void MplsTable::FreeReserveLabel ( uint32_t  start,
uint32_t  end 
)

Definition at line 384 of file mpls.cc.

Here is the call graph for this function:

AgentSandeshPtr MplsTable::GetAgentSandesh ( const AgentSandeshArguments args,
const std::string &  context 
)
virtual

Reimplemented from AgentDBTable.

Definition at line 470 of file mpls.cc.

Here is the call graph for this function:

virtual size_t MplsTable::Hash ( const DBEntry entry) const
inlinevirtual

Reimplemented from DBTable.

Definition at line 111 of file mpls.h.

virtual size_t MplsTable::Hash ( const DBRequestKey key) const
inlinevirtual

Reimplemented from DBTable.

Definition at line 112 of file mpls.h.

bool MplsTable::IsFabricMulticastLabel ( uint32_t  label) const

Definition at line 368 of file mpls.cc.

uint32_t MplsTable::LabelIndexCount ( )
inline

Definition at line 137 of file mpls.h.

Here is the call graph for this function:

bool MplsTable::OnChange ( DBEntry entry,
const DBRequest req 
)
virtual

Reimplemented from DBTable.

Definition at line 301 of file mpls.cc.

Here is the call graph for this function:

void MplsTable::OnZeroRefcount ( AgentDBEntry e)
virtual

Reimplemented from AgentDBTable.

Definition at line 331 of file mpls.cc.

Here is the call graph for this function:

void MplsTable::Process ( DBRequest req)
virtual

Reimplemented from AgentDBTable.

Definition at line 248 of file mpls.cc.

Here is the call graph for this function:

void MplsTable::ReserveLabel ( uint32_t  start,
uint32_t  end 
)

Definition at line 376 of file mpls.cc.

Here is the call graph for this function:

void MplsTable::ReserveMulticastLabel ( uint32_t  start,
uint32_t  end,
uint8_t  idx 
)

Definition at line 392 of file mpls.cc.

Here is the call graph for this function:

Member Data Documentation

const uint32_t MplsTable::kDpdkShiftBits = 4
static

Definition at line 104 of file mpls.h.

const uint32_t MplsTable::kImplicitNullLabel = 3
static

Definition at line 105 of file mpls.h.

const uint32_t MplsTable::kInvalidExportLabel = 0
static

Definition at line 102 of file mpls.h.

const uint32_t MplsTable::kInvalidLabel = 0xFFFFFFFF
static

Definition at line 101 of file mpls.h.

const uint32_t MplsTable::kStartLabel = 16
static

Definition at line 103 of file mpls.h.

IndexVector<MplsLabel *> MplsTable::label_table_
private

Definition at line 141 of file mpls.h.

uint32_t MplsTable::multicast_label_end_[MAX_XMPP_SERVERS]
private

Definition at line 143 of file mpls.h.

uint32_t MplsTable::multicast_label_start_[MAX_XMPP_SERVERS]
private

Definition at line 142 of file mpls.h.


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