OpenSDN source code
VxLanTable Class Reference

#include <vxlan.h>

Inheritance diagram for VxLanTable:
Collaboration diagram for VxLanTable:

Classes

struct  ConfigEntry
 
struct  ConfigKey
 

Public Types

typedef std::map< ConfigKey, ConfigEntry, ConfigKeyConfigTree
 
typedef std::map< uint32_t, ComponentNHKeyListVxlanCompositeNHList
 
typedef std::pair< uint32_t, ComponentNHKeyListVxlanCompositeNHEntry
 
- Public Types inherited from DBTable
typedef boost::intrusive_ptr< DBTableWalkDBTableWalkRef
 
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
 

Public Member Functions

 VxLanTable (DB *db, const std::string &name)
 
virtual ~VxLanTable ()
 
virtual std::unique_ptr< DBEntryAllocEntry (const DBRequestKey *k) const
 
virtual size_t Hash (const DBEntry *entry) const
 
virtual size_t Hash (const DBRequestKey *key) 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)
 
void Process (DBRequest &req)
 
void Create (uint32_t vxlan_id, const std::string &vrf_name, bool flood_unknown_unicast, bool mirror_destination, bool learning_enabled, bool bridge)
 
void Delete (uint32_t vxlan_id)
 
VxLanIdFind (uint32_t vxlan_id)
 
VxLanIdFindNoLock (uint32_t vxlan_id)
 
VxLanIdLocate (uint32_t vxlan_id, const boost::uuids::uuid &vn, const std::string &vrf, bool flood_unknown_unicast, bool mirror_destination, bool learning_enabled, bool bridge)
 
VxLanIdDelete (uint32_t vxlan_id, const boost::uuids::uuid &vn)
 
const ConfigTreeconfig_tree () const
 
void Initialize ()
 
void Register ()
 
void Shutdown ()
 
void VmInterfaceNotify (DBTablePartBase *partition, DBEntryBase *e)
 
bool AddCompositeNH (uint32_t vxlan_id, ComponentNHKeyPtr nh_key)
 
bool DeleteCompositeNH (uint32_t vxlan_id, ComponentNHKeyPtr nh_key)
 
- 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 kInvalidvxlan_id = 0
 
- 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 (VxLanId *vxlan_id, const DBRequest *req)
 
 DISALLOW_COPY_AND_ASSIGN (VxLanTable)
 

Private Attributes

ConfigTree config_tree_
 
DBTableBase::ListenerId vn_table_listener_id_
 
DBTableBase::ListenerId interface_listener_id_
 
VxlanCompositeNHList vxlan_composite_nh_map_
 

Detailed Description

Definition at line 83 of file vxlan.h.

Member Typedef Documentation

◆ ConfigTree

Definition at line 138 of file vxlan.h.

◆ VxlanCompositeNHEntry

Definition at line 140 of file vxlan.h.

◆ VxlanCompositeNHList

Definition at line 139 of file vxlan.h.

Constructor & Destructor Documentation

◆ VxLanTable()

VxLanTable::VxLanTable ( DB db,
const std::string &  name 
)
inline

Definition at line 142 of file vxlan.h.

◆ ~VxLanTable()

virtual VxLanTable::~VxLanTable ( )
inlinevirtual

Definition at line 143 of file vxlan.h.

Member Function Documentation

◆ Add()

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

Reimplemented from DBTable.

Definition at line 158 of file vxlan.cc.

Here is the call graph for this function:

◆ AddCompositeNH()

bool VxLanTable::AddCompositeNH ( uint32_t  vxlan_id,
ComponentNHKeyPtr  nh_key 
)

Definition at line 122 of file vxlan.cc.

◆ AllocEntry()

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

Implements DBTable.

Definition at line 145 of file vxlan.cc.

Here is the call graph for this function:

◆ ChangeHandler()

bool VxLanTable::ChangeHandler ( VxLanId vxlan_id,
const DBRequest req 
)
private

Definition at line 176 of file vxlan.cc.

Here is the call graph for this function:

◆ config_tree()

const ConfigTree& VxLanTable::config_tree ( ) const
inline

Definition at line 170 of file vxlan.h.

◆ Create()

void VxLanTable::Create ( uint32_t  vxlan_id,
const std::string &  vrf_name,
bool  flood_unknown_unicast,
bool  mirror_destination,
bool  learning_enabled,
bool  bridge 
)

Definition at line 330 of file vxlan.cc.

◆ CreateTable()

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

Definition at line 324 of file vxlan.cc.

Here is the call graph for this function:

◆ Delete() [1/3]

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

Reimplemented from DBTable.

Definition at line 217 of file vxlan.cc.

Here is the call graph for this function:

◆ Delete() [2/3]

void VxLanTable::Delete ( uint32_t  vxlan_id)

Definition at line 362 of file vxlan.cc.

◆ Delete() [3/3]

VxLanId * VxLanTable::Delete ( uint32_t  vxlan_id,
const boost::uuids::uuid vn 
)

Definition at line 296 of file vxlan.cc.

◆ DeleteCompositeNH()

bool VxLanTable::DeleteCompositeNH ( uint32_t  vxlan_id,
ComponentNHKeyPtr  nh_key 
)

Definition at line 101 of file vxlan.cc.

◆ DISALLOW_COPY_AND_ASSIGN()

VxLanTable::DISALLOW_COPY_AND_ASSIGN ( VxLanTable  )
private

◆ Find()

VxLanId * VxLanTable::Find ( uint32_t  vxlan_id)

Definition at line 223 of file vxlan.cc.

◆ FindNoLock()

VxLanId * VxLanTable::FindNoLock ( uint32_t  vxlan_id)

Definition at line 228 of file vxlan.cc.

◆ GetAgentSandesh()

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

Reimplemented from AgentDBTable.

Definition at line 432 of file vxlan.cc.

Here is the call graph for this function:

◆ Hash() [1/2]

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

Reimplemented from DBTable.

Definition at line 146 of file vxlan.h.

◆ Hash() [2/2]

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

Reimplemented from DBTable.

Definition at line 147 of file vxlan.h.

◆ Initialize()

void VxLanTable::Initialize ( )

Definition at line 35 of file vxlan.cc.

◆ Locate()

VxLanId * VxLanTable::Locate ( uint32_t  vxlan_id,
const boost::uuids::uuid vn,
const std::string &  vrf,
bool  flood_unknown_unicast,
bool  mirror_destination,
bool  learning_enabled,
bool  bridge 
)

Definition at line 242 of file vxlan.cc.

◆ OnChange()

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

Reimplemented from DBTable.

Definition at line 167 of file vxlan.cc.

Here is the call graph for this function:

◆ OnZeroRefcount()

void VxLanTable::OnZeroRefcount ( AgentDBEntry e)
virtual

Reimplemented from AgentDBTable.

Definition at line 233 of file vxlan.cc.

Here is the call graph for this function:

◆ Process()

void VxLanTable::Process ( DBRequest req)
virtual

Reimplemented from AgentDBTable.

Definition at line 151 of file vxlan.cc.

◆ Register()

void VxLanTable::Register ( )

Definition at line 39 of file vxlan.cc.

Here is the call graph for this function:

◆ Shutdown()

void VxLanTable::Shutdown ( )

Definition at line 45 of file vxlan.cc.

◆ VmInterfaceNotify()

void VxLanTable::VmInterfaceNotify ( DBTablePartBase partition,
DBEntryBase e 
)

Definition at line 49 of file vxlan.cc.

Here is the call graph for this function:

Member Data Documentation

◆ config_tree_

ConfigTree VxLanTable::config_tree_
private

Definition at line 180 of file vxlan.h.

◆ interface_listener_id_

DBTableBase::ListenerId VxLanTable::interface_listener_id_
private

Definition at line 182 of file vxlan.h.

◆ kInvalidvxlan_id

const uint32_t VxLanTable::kInvalidvxlan_id = 0
static

Definition at line 141 of file vxlan.h.

◆ vn_table_listener_id_

DBTableBase::ListenerId VxLanTable::vn_table_listener_id_
private

Definition at line 181 of file vxlan.h.

◆ vxlan_composite_nh_map_

VxlanCompositeNHList VxLanTable::vxlan_composite_nh_map_
private

Definition at line 183 of file vxlan.h.


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