OpenSDN source code
KSyncMemory Class Referenceabstract

#include <ksync_memory.h>

Inheritance diagram for KSyncMemory:
Collaboration diagram for KSyncMemory:

Classes

struct  AuditEntry
 

Public Member Functions

 KSyncMemory (KSync *ksync, uint32_t minor_id)
 
virtual ~KSyncMemory ()
 
virtual void Init ()
 
void InitMem (void *hpmem)
 
virtual void InitTest ()
 
virtual void Shutdown ()
 
bool AuditProcess ()
 
void MapSharedMemory ()
 
void GetTableSize ()
 
int GetKernelTableSize ()
 
void UnmapMemTest ()
 
virtual int EncodeReq (nl_client *nl, uint32_t attr_len)=0
 
virtual int get_entry_size ()=0
 
virtual void SetTableSize ()
 
virtual bool IsInactiveEntry (uint32_t idx, uint8_t &gen_id)=0
 
virtual void CreateProtoAuditEntry (uint32_t index, uint8_t gen_id)=0
 
virtual void DecrementHoldFlowCounter ()
 
virtual void IncrementHoldFlowCounter ()
 
virtual void UpdateAgentHoldFlowCounter ()
 
KSyncksync () const
 
void set_major_devid (int id)
 
void set_table_size (int count)
 
void set_table_path (const std::string &path)
 
uint32_t audit_timeout () const
 
void Mmap (bool unlink, void *khpmem, bool kernel_mode)
 
uint32_t table_entries_count ()
 

Static Public Attributes

static const uint32_t kAuditSweepTime = 180
 
static const uint32_t kAuditYieldTimer = 100
 
static const uint32_t kAuditTimeout = (5 * 1000 * 1000)
 
static const uint32_t kAuditYieldMax = (1024)
 
static const uint32_t kAuditYieldMin = (100)
 

Protected Attributes

KSyncksync_
 
void * table_
 
std::string table_path_
 
int major_devid_
 
int minor_devid_
 
int table_size_
 
uint32_t table_entries_count_
 
Timeraudit_timer_
 
uint32_t audit_timeout_
 
uint32_t audit_yield_
 
uint32_t audit_interval_
 
uint32_t audit_idx_
 
std::list< AuditEntryaudit_list_
 

Detailed Description

Definition at line 15 of file ksync_memory.h.

Constructor & Destructor Documentation

◆ KSyncMemory()

KSyncMemory::KSyncMemory ( KSync ksync,
uint32_t  minor_id 
)

Definition at line 46 of file ksync_memory.cc.

◆ ~KSyncMemory()

KSyncMemory::~KSyncMemory ( )
virtual

Definition at line 65 of file ksync_memory.cc.

Here is the call graph for this function:

Member Function Documentation

◆ audit_timeout()

uint32_t KSyncMemory::audit_timeout ( ) const
inline

Definition at line 55 of file ksync_memory.h.

◆ AuditProcess()

bool KSyncMemory::AuditProcess ( )

Definition at line 179 of file ksync_memory.cc.

Here is the call graph for this function:

◆ CreateProtoAuditEntry()

virtual void KSyncMemory::CreateProtoAuditEntry ( uint32_t  index,
uint8_t  gen_id 
)
pure virtual

Implemented in KSyncFlowMemory, and KSyncBridgeMemory.

◆ DecrementHoldFlowCounter()

virtual void KSyncMemory::DecrementHoldFlowCounter ( )
inlinevirtual

Reimplemented in KSyncFlowMemory.

Definition at line 46 of file ksync_memory.h.

◆ EncodeReq()

virtual int KSyncMemory::EncodeReq ( nl_client *  nl,
uint32_t  attr_len 
)
pure virtual

Implemented in KSyncFlowMemory, and KSyncBridgeMemory.

◆ get_entry_size()

virtual int KSyncMemory::get_entry_size ( )
pure virtual

Implemented in KSyncFlowMemory, and KSyncBridgeMemory.

◆ GetKernelTableSize()

int KSyncMemory::GetKernelTableSize ( )

Definition at line 123 of file ksync_memory.cc.

Here is the call graph for this function:

◆ GetTableSize()

void KSyncMemory::GetTableSize ( )

Definition at line 217 of file ksync_memory.cc.

Here is the call graph for this function:

◆ IncrementHoldFlowCounter()

virtual void KSyncMemory::IncrementHoldFlowCounter ( )
inlinevirtual

Reimplemented in KSyncFlowMemory.

Definition at line 47 of file ksync_memory.h.

◆ Init()

void KSyncMemory::Init ( )
virtual

Reimplemented in KSyncFlowMemory.

Definition at line 69 of file ksync_memory.cc.

Here is the call graph for this function:

◆ InitMem()

void KSyncMemory::InitMem ( void *  hpmem)

Definition at line 165 of file ksync_memory.cc.

Here is the call graph for this function:

◆ InitTest()

void KSyncMemory::InitTest ( )
virtual

Reimplemented in KSyncFlowMemory, and KSyncBridgeMemory.

Definition at line 171 of file ksync_memory.cc.

◆ IsInactiveEntry()

virtual bool KSyncMemory::IsInactiveEntry ( uint32_t  idx,
uint8_t &  gen_id 
)
pure virtual

Implemented in KSyncFlowMemory, and KSyncBridgeMemory.

◆ ksync()

KSync* KSyncMemory::ksync ( ) const
inline

Definition at line 49 of file ksync_memory.h.

◆ MapSharedMemory()

void KSyncMemory::MapSharedMemory ( )

Definition at line 279 of file ksync_memory.cc.

Here is the call graph for this function:

◆ Mmap()

void KSyncMemory::Mmap ( bool  unlink,
void *  khpmem,
bool  kernel_mode 
)

Definition at line 87 of file ksync_memory.cc.

Here is the call graph for this function:

◆ set_major_devid()

void KSyncMemory::set_major_devid ( int  id)
inline

Definition at line 50 of file ksync_memory.h.

◆ set_table_path()

void KSyncMemory::set_table_path ( const std::string &  path)
inline

Definition at line 52 of file ksync_memory.h.

◆ set_table_size()

void KSyncMemory::set_table_size ( int  count)
inline

Definition at line 51 of file ksync_memory.h.

◆ SetTableSize()

virtual void KSyncMemory::SetTableSize ( )
inlinevirtual

Reimplemented in KSyncFlowMemory, and KSyncBridgeMemory.

Definition at line 43 of file ksync_memory.h.

◆ Shutdown()

void KSyncMemory::Shutdown ( void  )
virtual

Reimplemented in KSyncFlowMemory, and KSyncBridgeMemory.

Definition at line 175 of file ksync_memory.cc.

◆ table_entries_count()

uint32_t KSyncMemory::table_entries_count ( )
inline

Definition at line 57 of file ksync_memory.h.

◆ UnmapMemTest()

void KSyncMemory::UnmapMemTest ( )

◆ UpdateAgentHoldFlowCounter()

virtual void KSyncMemory::UpdateAgentHoldFlowCounter ( )
inlinevirtual

Reimplemented in KSyncFlowMemory.

Definition at line 48 of file ksync_memory.h.

Member Data Documentation

◆ audit_idx_

uint32_t KSyncMemory::audit_idx_
protected

Definition at line 87 of file ksync_memory.h.

◆ audit_interval_

uint32_t KSyncMemory::audit_interval_
protected

Definition at line 86 of file ksync_memory.h.

◆ audit_list_

std::list<AuditEntry> KSyncMemory::audit_list_
protected

Definition at line 88 of file ksync_memory.h.

◆ audit_timeout_

uint32_t KSyncMemory::audit_timeout_
protected

Definition at line 84 of file ksync_memory.h.

◆ audit_timer_

Timer* KSyncMemory::audit_timer_
protected

Definition at line 82 of file ksync_memory.h.

◆ audit_yield_

uint32_t KSyncMemory::audit_yield_
protected

Definition at line 85 of file ksync_memory.h.

◆ kAuditSweepTime

const uint32_t KSyncMemory::kAuditSweepTime = 180
static

Definition at line 18 of file ksync_memory.h.

◆ kAuditTimeout

const uint32_t KSyncMemory::kAuditTimeout = (5 * 1000 * 1000)
static

Definition at line 22 of file ksync_memory.h.

◆ kAuditYieldMax

const uint32_t KSyncMemory::kAuditYieldMax = (1024)
static

Definition at line 24 of file ksync_memory.h.

◆ kAuditYieldMin

const uint32_t KSyncMemory::kAuditYieldMin = (100)
static

Definition at line 26 of file ksync_memory.h.

◆ kAuditYieldTimer

const uint32_t KSyncMemory::kAuditYieldTimer = 100
static

Definition at line 20 of file ksync_memory.h.

◆ ksync_

KSync* KSyncMemory::ksync_
protected

Definition at line 70 of file ksync_memory.h.

◆ major_devid_

int KSyncMemory::major_devid_
protected

Definition at line 75 of file ksync_memory.h.

◆ minor_devid_

int KSyncMemory::minor_devid_
protected

Definition at line 76 of file ksync_memory.h.

◆ table_

void* KSyncMemory::table_
protected

Definition at line 71 of file ksync_memory.h.

◆ table_entries_count_

uint32_t KSyncMemory::table_entries_count_
protected

Definition at line 80 of file ksync_memory.h.

◆ table_path_

std::string KSyncMemory::table_path_
protected

Definition at line 73 of file ksync_memory.h.

◆ table_size_

int KSyncMemory::table_size_
protected

Definition at line 78 of file ksync_memory.h.


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