OpenSDN source code
|
#include <ksync_object.h>
Public Types | |
typedef boost::intrusive::member_hook < KSyncEntry, boost::intrusive::set_member_hook <>,&KSyncEntry::node_ > | KSyncObjectNode |
typedef boost::intrusive::set < KSyncEntry, KSyncObjectNode > | Tree |
typedef boost::intrusive::member_hook < KSyncFwdReference, boost::intrusive::set_member_hook <>,&KSyncFwdReference::node_ > | KSyncFwdRefNode |
typedef boost::intrusive::set < KSyncFwdReference, KSyncFwdRefNode > | FwdRefTree |
typedef boost::intrusive::member_hook < KSyncBackReference, boost::intrusive::set_member_hook <>,&KSyncBackReference::node_ > | KSyncBackRefNode |
typedef boost::intrusive::set < KSyncBackReference, KSyncBackRefNode > | BackRefTree |
Public Member Functions | |
KSyncObject (const std::string &name) | |
KSyncObject (const std::string &name, int max_index) | |
virtual | ~KSyncObject () |
void | InitStaleEntryCleanup (boost::asio::io_context &ios, uint32_t cleanup_time, uint32_t cleanup_intvl, uint16_t entries_per_intvl) |
void | NotifyEvent (KSyncEntry *entry, KSyncEntry::KSyncEvent event) |
void | SafeNotifyEvent (KSyncEntry *entry, KSyncEntry::KSyncEvent event) |
virtual void | NetlinkAck (KSyncEntry *entry, KSyncEntry::KSyncEvent event) |
void | BackRefAdd (KSyncEntry *key, KSyncEntry *reference) |
void | BackRefDel (KSyncEntry *key) |
void | BackRefReEval (KSyncEntry *key) |
KSyncEntry * | Create (const KSyncEntry *key) |
KSyncEntry * | Create (const KSyncEntry *key, bool skip_lookup) |
KSyncEntry * | CreateStale (const KSyncEntry *key) |
void | Change (KSyncEntry *entry) |
void | Delete (KSyncEntry *entry) |
KSyncEntry * | Find (const KSyncEntry *key) |
KSyncEntry * | Next (const KSyncEntry *entry) const |
KSyncEntry * | GetReference (const KSyncEntry *key) |
virtual KSyncEntry * | Alloc (const KSyncEntry *key, uint32_t index)=0 |
virtual void | Free (KSyncEntry *entry) |
virtual void | EmptyTable (void) |
bool | IsEmpty (void) |
virtual bool | DoEventTrace (void) |
virtual void | PreFree (KSyncEntry *entry) |
std::size_t | Size () |
void | set_delete_scheduled () |
bool | delete_scheduled () |
virtual SandeshTraceBufferPtr | GetKSyncTraceBuf () |
Static Public Member Functions | |
static void | Shutdown () |
Protected Member Functions | |
KSyncEntry * | CreateImpl (const KSyncEntry *key) |
void | ClearStale (KSyncEntry *entry) |
void | ChangeKey (KSyncEntry *entry, uint32_t arg) |
virtual void | UpdateKey (KSyncEntry *entry, uint32_t arg) |
virtual uint32_t | GetKey (KSyncEntry *entry) |
Protected Attributes | |
tbb::recursive_mutex | lock_ |
Private Member Functions | |
void | FreeInd (KSyncEntry *entry, uint32_t index) |
void | NetlinkAckInternal (KSyncEntry *entry, KSyncEntry::KSyncEvent event) |
bool | IsIndexValid () const |
bool | StaleEntryCleanupCb () |
virtual void | CleanupOnDel (KSyncEntry *kentry) |
DISALLOW_COPY_AND_ASSIGN (KSyncObject) | |
Private Attributes | |
Tree | tree_ |
bool | need_index_ |
KSyncIndexTable | index_table_ |
bool | delete_scheduled_ |
std::set < KSyncEntry::KSyncEntryPtr > | stale_entry_tree_ |
Timer * | stale_entry_cleanup_timer_ |
uint32_t | stale_entry_cleanup_intvl_ |
uint16_t | stale_entries_per_intvl_ |
SandeshTraceBufferPtr | KSyncTraceBuf |
Static Private Attributes | |
static FwdRefTree | fwd_ref_tree_ |
static BackRefTree | back_ref_tree_ |
Friends | |
class | KSyncEntry |
void | TestTriggerStaleEntryCleanupCb (KSyncObject *obj) |
Definition at line 70 of file ksync_object.h.
typedef boost::intrusive::set<KSyncBackReference, KSyncBackRefNode> KSyncObject::BackRefTree |
Definition at line 85 of file ksync_object.h.
typedef boost::intrusive::set<KSyncFwdReference, KSyncFwdRefNode> KSyncObject::FwdRefTree |
Definition at line 80 of file ksync_object.h.
typedef boost::intrusive::member_hook<KSyncBackReference, boost::intrusive::set_member_hook<>, &KSyncBackReference::node_> KSyncObject::KSyncBackRefNode |
Definition at line 84 of file ksync_object.h.
typedef boost::intrusive::member_hook<KSyncFwdReference, boost::intrusive::set_member_hook<>, &KSyncFwdReference::node_> KSyncObject::KSyncFwdRefNode |
Definition at line 79 of file ksync_object.h.
typedef boost::intrusive::member_hook<KSyncEntry, boost::intrusive::set_member_hook<>, &KSyncEntry::node_> KSyncObject::KSyncObjectNode |
Definition at line 74 of file ksync_object.h.
typedef boost::intrusive::set<KSyncEntry, KSyncObjectNode> KSyncObject::Tree |
Definition at line 75 of file ksync_object.h.
KSyncObject::KSyncObject | ( | const std::string & | name | ) |
KSyncObject::KSyncObject | ( | const std::string & | name, |
int | max_index | ||
) |
|
virtual |
|
pure virtual |
Implemented in VrfKSyncObject, FlowTableKSyncObject, InterfaceKSyncObject, NHKSyncObject, RouteKSyncObject, KSyncVxlanRouteObject, MirrorKSyncObject, QosConfigKSyncObject, ForwardingClassKSyncObject, VrfAssignKSyncObject, VxLanKSyncObject, BridgeRouteAuditKSyncObject, MplsKSyncObject, OVSDB::HaStaleDevVnTable, QosQueueKSyncObject, KSyncLinuxFdbObject, OVSDB::LogicalSwitchTable, KSyncVxlanPortObject, OVSDB::MulticastMacLocalOvsdb, OVSDB::UnicastMacRemoteTable, KSyncVxlanBridgeObject, OVSDB::HaStaleL2RouteTable, OVSDB::VrfOvsdbObject, OVSDB::UnicastMacLocalOvsdb, OVSDB::HaStaleVnTable, OVSDB::PhysicalPortTable, OVSDB::PhysicalSwitchTable, KSyncLinuxPortObject, OVSDB::VlanPortBindingTable, KSyncLinuxBridgeObject, OVSDB::VMInterfaceKSyncObject, OVSDB::VnOvsdbObject, and OVSDB::PhysicalLocatorTable.
void KSyncObject::BackRefAdd | ( | KSyncEntry * | key, |
KSyncEntry * | reference | ||
) |
void KSyncObject::BackRefDel | ( | KSyncEntry * | key | ) |
void KSyncObject::BackRefReEval | ( | KSyncEntry * | key | ) |
void KSyncObject::Change | ( | KSyncEntry * | entry | ) |
|
protected |
|
inlineprivatevirtual |
Reimplemented in KSyncDBObject.
Definition at line 179 of file ksync_object.h.
|
protected |
Definition at line 148 of file ksync_object.cc.
KSyncEntry * KSyncObject::Create | ( | const KSyncEntry * | key | ) |
Definition at line 179 of file ksync_object.cc.
KSyncEntry * KSyncObject::Create | ( | const KSyncEntry * | key, |
bool | skip_lookup | ||
) |
|
protected |
KSyncEntry * KSyncObject::CreateStale | ( | const KSyncEntry * | key | ) |
void KSyncObject::Delete | ( | KSyncEntry * | entry | ) |
|
inline |
Definition at line 146 of file ksync_object.h.
|
private |
|
inlinevirtual |
Reimplemented in FlowTableKSyncObject.
Definition at line 140 of file ksync_object.h.
|
inlinevirtual |
Reimplemented in RouteKSyncObject, KSyncVxlanRouteObject, OVSDB::OvsdbDBObject, OVSDB::HaStaleDevVnTable, OVSDB::UnicastMacRemoteTable, OVSDB::HaStaleL2RouteTable, OVSDB::OvsdbObject, and OVSDB::HaStaleVnTable.
Definition at line 137 of file ksync_object.h.
KSyncEntry * KSyncObject::Find | ( | const KSyncEntry * | key | ) |
Definition at line 99 of file ksync_object.cc.
|
virtual |
Reimplemented in FlowTableKSyncObject.
Definition at line 268 of file ksync_object.cc.
|
private |
|
protectedvirtual |
Reimplemented in FlowTableKSyncObject.
Definition at line 254 of file ksync_object.cc.
|
inlinevirtual |
Definition at line 147 of file ksync_object.h.
KSyncEntry * KSyncObject::GetReference | ( | const KSyncEntry * | key | ) |
void KSyncObject::InitStaleEntryCleanup | ( | boost::asio::io_context & | ios, |
uint32_t | cleanup_time, | ||
uint32_t | cleanup_intvl, | ||
uint16_t | entries_per_intvl | ||
) |
|
inline |
Definition at line 138 of file ksync_object.h.
|
inlineprivate |
Definition at line 173 of file ksync_object.h.
|
virtual |
Reimplemented in FlowTableKSyncObject.
Definition at line 1458 of file ksync_object.cc.
|
private |
KSyncEntry * KSyncObject::Next | ( | const KSyncEntry * | entry | ) | const |
Definition at line 108 of file ksync_object.cc.
void KSyncObject::NotifyEvent | ( | KSyncEntry * | entry, |
KSyncEntry::KSyncEvent | event | ||
) |
|
inlinevirtual |
Definition at line 141 of file ksync_object.h.
void KSyncObject::SafeNotifyEvent | ( | KSyncEntry * | entry, |
KSyncEntry::KSyncEvent | event | ||
) |
|
inline |
Definition at line 145 of file ksync_object.h.
|
static |
Definition at line 94 of file ksync_object.cc.
|
inline |
Definition at line 144 of file ksync_object.h.
|
private |
|
inlineprotectedvirtual |
Reimplemented in FlowTableKSyncObject.
Definition at line 158 of file ksync_object.h.
|
friend |
Definition at line 165 of file ksync_object.h.
|
friend |
Definition at line 51 of file ksync_object.cc.
|
staticprivate |
Definition at line 186 of file ksync_object.h.
|
private |
Definition at line 192 of file ksync_object.h.
|
staticprivate |
Definition at line 184 of file ksync_object.h.
|
private |
Definition at line 190 of file ksync_object.h.
|
private |
Definition at line 202 of file ksync_object.h.
|
mutableprotected |
Definition at line 156 of file ksync_object.h.
|
private |
Definition at line 188 of file ksync_object.h.
|
private |
Definition at line 201 of file ksync_object.h.
|
private |
Definition at line 200 of file ksync_object.h.
|
private |
Definition at line 198 of file ksync_object.h.
|
private |
Definition at line 195 of file ksync_object.h.
|
private |
Definition at line 182 of file ksync_object.h.