OpenSDN source code
VrfKSyncObject Class Reference

#include <route_ksync.h>

Inheritance diagram for VrfKSyncObject:
Collaboration diagram for VrfKSyncObject:

Classes

struct  VrfState
 

Public Types

typedef std::pair< IpAddress, uint32_t > IpToMacBindingKey
 
typedef std::map< IpToMacBindingKey, MacBindingIpToMacBinding
 
- Public Types inherited from KSyncDBObject
enum  DBFilterResp {
  DBFilterAccept , DBFilterIgnore , DBFilterDelete , DBFilterDelAdd ,
  DBFilterMax
}
 
- Public Types inherited from KSyncObject
typedef boost::intrusive::member_hook< KSyncEntry, boost::intrusive::set_member_hook<>, &KSyncEntry::node_KSyncObjectNode
 
typedef boost::intrusive::set< KSyncEntry, KSyncObjectNodeTree
 
typedef boost::intrusive::member_hook< KSyncFwdReference, boost::intrusive::set_member_hook<>, &KSyncFwdReference::node_KSyncFwdRefNode
 
typedef boost::intrusive::set< KSyncFwdReference, KSyncFwdRefNodeFwdRefTree
 
typedef boost::intrusive::member_hook< KSyncBackReference, boost::intrusive::set_member_hook<>, &KSyncBackReference::node_KSyncBackRefNode
 
typedef boost::intrusive::set< KSyncBackReference, KSyncBackRefNodeBackRefTree
 

Public Member Functions

 VrfKSyncObject (KSync *ksync)
 
virtual ~VrfKSyncObject ()
 
KSyncksync () const
 
void RegisterDBClients ()
 
void Shutdown ()
 
void VrfNotify (DBTablePartBase *partition, DBEntryBase *e)
 
void EvpnRouteTableNotify (DBTablePartBase *partition, DBEntryBase *e)
 
void UnRegisterEvpnRouteTableListener (const VrfEntry *entry, VrfState *state)
 
void AddIpMacBinding (VrfEntry *vrf, const IpAddress &ip, const MacAddress &mac, uint32_t ethernet_tag, uint32_t pref, bool wait_for_traffic)
 
void DelIpMacBinding (VrfEntry *vrf, const IpAddress &ip, const MacAddress &mac, uint32_t ethernet_tag)
 
MacAddress GetIpMacBinding (VrfEntry *vrf, const IpAddress &ip, const InetUnicastRouteEntry *rt) const
 
bool GetIpMacWaitForTraffic (VrfEntry *vrf, const IpAddress &ip) const
 
void NotifyUcRoute (VrfEntry *vrf, VrfState *state, const IpAddress &ip)
 
bool RouteNeedsMacBinding (const InetUnicastRouteEntry *rt)
 
DBTableBase::ListenerId vrf_listener_id () const
 
virtual KSyncEntryAlloc (const KSyncEntry *entry, uint32_t index)
 
virtual KSyncEntryDBToKSyncEntry (const DBEntry *entry)
 
- Public Member Functions inherited from KSyncDBObject
 KSyncDBObject (const std::string &name)
 
 KSyncDBObject (const std::string &name, int max_index)
 
 KSyncDBObject (const std::string &name, DBTableBase *table)
 
 KSyncDBObject (const std::string &name, DBTableBase *table, int max_index)
 
virtual ~KSyncDBObject ()
 
void RegisterDb (DBTableBase *table)
 
void UnregisterDb (DBTableBase *table)
 
void Notify (DBTablePartBase *partition, DBEntryBase *entry)
 
DBTableBaseGetDBTable ()
 
DBTableBase::ListenerId GetListenerId (DBTableBase *table)
 
virtual DBFilterResp DBEntryFilter (const DBEntry *entry, const KSyncDBEntry *ksync)
 
void set_test_id (DBTableBase::ListenerId id)
 
DBTableBase::ListenerId id () const
 
- Public Member Functions inherited from KSyncObject
 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)
 
KSyncEntryCreate (const KSyncEntry *key)
 
KSyncEntryCreate (const KSyncEntry *key, bool skip_lookup)
 
KSyncEntryCreateStale (const KSyncEntry *key)
 
void Change (KSyncEntry *entry)
 
void Delete (KSyncEntry *entry)
 
KSyncEntryFind (const KSyncEntry *key)
 
KSyncEntryNext (const KSyncEntry *entry) const
 
KSyncEntryGetReference (const KSyncEntry *key)
 
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 ()
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (VrfKSyncObject)
 

Private Attributes

KSyncksync_
 
DBTableBase::ListenerId vrf_listener_id_
 
bool marked_delete_
 
VrfTablevrf_table_
 

Additional Inherited Members

- Static Public Member Functions inherited from KSyncObject
static void Shutdown ()
 
- Protected Member Functions inherited from KSyncObject
KSyncEntryCreateImpl (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 inherited from KSyncObject
tbb::recursive_mutex lock_
 

Detailed Description

Definition at line 222 of file route_ksync.h.

Member Typedef Documentation

◆ IpToMacBinding

Definition at line 226 of file route_ksync.h.

◆ IpToMacBindingKey

typedef std::pair<IpAddress, uint32_t> VrfKSyncObject::IpToMacBindingKey

Definition at line 225 of file route_ksync.h.

Constructor & Destructor Documentation

◆ VrfKSyncObject()

VrfKSyncObject::VrfKSyncObject ( KSync ksync)

Definition at line 1103 of file route_ksync.cc.

Here is the call graph for this function:

◆ ~VrfKSyncObject()

VrfKSyncObject::~VrfKSyncObject ( )
virtual

Definition at line 1108 of file route_ksync.cc.

Member Function Documentation

◆ AddIpMacBinding()

void VrfKSyncObject::AddIpMacBinding ( VrfEntry vrf,
const IpAddress ip,
const MacAddress mac,
uint32_t  ethernet_tag,
uint32_t  pref,
bool  wait_for_traffic 
)

Definition at line 1227 of file route_ksync.cc.

Here is the call graph for this function:

◆ Alloc()

KSyncEntry * VrfKSyncObject::Alloc ( const KSyncEntry entry,
uint32_t  index 
)
virtual

Implements KSyncObject.

Definition at line 981 of file route_ksync.cc.

Here is the call graph for this function:

◆ DBToKSyncEntry()

KSyncEntry * VrfKSyncObject::DBToKSyncEntry ( const DBEntry entry)
virtual

Implements KSyncDBObject.

Definition at line 987 of file route_ksync.cc.

◆ DelIpMacBinding()

void VrfKSyncObject::DelIpMacBinding ( VrfEntry vrf,
const IpAddress ip,
const MacAddress mac,
uint32_t  ethernet_tag 
)

Definition at line 1252 of file route_ksync.cc.

Here is the call graph for this function:

◆ DISALLOW_COPY_AND_ASSIGN()

VrfKSyncObject::DISALLOW_COPY_AND_ASSIGN ( VrfKSyncObject  )
private

◆ EvpnRouteTableNotify()

void VrfKSyncObject::EvpnRouteTableNotify ( DBTablePartBase partition,
DBEntryBase e 
)

Definition at line 1072 of file route_ksync.cc.

Here is the call graph for this function:

◆ GetIpMacBinding()

MacAddress VrfKSyncObject::GetIpMacBinding ( VrfEntry vrf,
const IpAddress ip,
const InetUnicastRouteEntry rt 
) const

Definition at line 1289 of file route_ksync.cc.

Here is the call graph for this function:

◆ GetIpMacWaitForTraffic()

bool VrfKSyncObject::GetIpMacWaitForTraffic ( VrfEntry vrf,
const IpAddress ip 
) const

Definition at line 1271 of file route_ksync.cc.

Here is the call graph for this function:

◆ ksync()

KSync* VrfKSyncObject::ksync ( ) const
inline

Definition at line 244 of file route_ksync.h.

◆ NotifyUcRoute()

void VrfKSyncObject::NotifyUcRoute ( VrfEntry vrf,
VrfState state,
const IpAddress ip 
)

Definition at line 1207 of file route_ksync.cc.

Here is the call graph for this function:

◆ RegisterDBClients()

void VrfKSyncObject::RegisterDBClients ( )

Definition at line 1111 of file route_ksync.cc.

Here is the call graph for this function:

◆ RouteNeedsMacBinding()

bool VrfKSyncObject::RouteNeedsMacBinding ( const InetUnicastRouteEntry rt)

Definition at line 1148 of file route_ksync.cc.

Here is the call graph for this function:

◆ Shutdown()

void VrfKSyncObject::Shutdown ( void  )

Definition at line 1116 of file route_ksync.cc.

Here is the call graph for this function:

◆ UnRegisterEvpnRouteTableListener()

void VrfKSyncObject::UnRegisterEvpnRouteTableListener ( const VrfEntry entry,
VrfState state 
)

Definition at line 1092 of file route_ksync.cc.

Here is the call graph for this function:

◆ vrf_listener_id()

DBTableBase::ListenerId VrfKSyncObject::vrf_listener_id ( ) const
inline

Definition at line 266 of file route_ksync.h.

◆ VrfNotify()

void VrfKSyncObject::VrfNotify ( DBTablePartBase partition,
DBEntryBase e 
)

Definition at line 993 of file route_ksync.cc.

Here is the call graph for this function:

Member Data Documentation

◆ ksync_

KSync* VrfKSyncObject::ksync_
private

Definition at line 271 of file route_ksync.h.

◆ marked_delete_

bool VrfKSyncObject::marked_delete_
private

Definition at line 273 of file route_ksync.h.

◆ vrf_listener_id_

DBTableBase::ListenerId VrfKSyncObject::vrf_listener_id_
private

Definition at line 272 of file route_ksync.h.

◆ vrf_table_

VrfTable* VrfKSyncObject::vrf_table_
private

Definition at line 274 of file route_ksync.h.


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