OpenSDN source code
KSyncFlowEntryFreeList Class Reference

#include <flowtable_ksync.h>

Collaboration diagram for KSyncFlowEntryFreeList:

Public Types

typedef boost::intrusive::member_hook< FlowTableKSyncEntry, boost::intrusive::list_member_hook<>, &FlowTableKSyncEntry::free_list_node_Node
 
typedef boost::intrusive::list< FlowTableKSyncEntry, NodeFreeList
 

Public Member Functions

 KSyncFlowEntryFreeList (FlowTableKSyncObject *object)
 
 KSyncFlowEntryFreeList (FlowTableKSyncObject *object, FlowEntry *flow, uint32_t hash_id)
 
virtual ~KSyncFlowEntryFreeList ()
 
void Reset ()
 
void Reset (FlowEntryPtr fe, uint32_t hash_id)
 
FlowTableKSyncEntryAllocate (const KSyncEntry *key)
 
void Free (FlowTableKSyncEntry *flow)
 
void Grow ()
 
uint32_t max_count () const
 
uint32_t free_count () const
 
uint32_t alloc_count () const
 
uint32_t total_alloc () const
 
uint32_t total_free () const
 

Static Public Attributes

static const uint32_t kInitCount = (25 * 1000)
 
static const uint32_t kTestInitCount = (5 * 1000)
 
static const uint32_t kGrowSize = (1 * 1000)
 
static const uint32_t kMinThreshold = (4 * 1000)
 
static const uint32_t kMaxThreshold = (100 * 1000)
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (KSyncFlowEntryFreeList)
 

Private Attributes

FlowTableKSyncObjectobject_
 
uint32_t max_count_
 
bool grow_pending_
 
uint64_t total_alloc_
 
uint64_t total_free_
 
FreeList free_list_
 

Detailed Description

Definition at line 172 of file flowtable_ksync.h.

Member Typedef Documentation

◆ FreeList

typedef boost::intrusive::list<FlowTableKSyncEntry, Node> KSyncFlowEntryFreeList::FreeList

Definition at line 183 of file flowtable_ksync.h.

◆ Node

typedef boost::intrusive::member_hook<FlowTableKSyncEntry, boost::intrusive::list_member_hook<>, &FlowTableKSyncEntry::free_list_node_> KSyncFlowEntryFreeList::Node

Definition at line 182 of file flowtable_ksync.h.

Constructor & Destructor Documentation

◆ KSyncFlowEntryFreeList() [1/2]

KSyncFlowEntryFreeList::KSyncFlowEntryFreeList ( FlowTableKSyncObject object)

Definition at line 732 of file flowtable_ksync.cc.

Here is the call graph for this function:

◆ KSyncFlowEntryFreeList() [2/2]

KSyncFlowEntryFreeList::KSyncFlowEntryFreeList ( FlowTableKSyncObject object,
FlowEntry flow,
uint32_t  hash_id 
)

◆ ~KSyncFlowEntryFreeList()

KSyncFlowEntryFreeList::~KSyncFlowEntryFreeList ( )
virtual

Definition at line 746 of file flowtable_ksync.cc.

Member Function Documentation

◆ alloc_count()

uint32_t KSyncFlowEntryFreeList::alloc_count ( ) const
inline

Definition at line 198 of file flowtable_ksync.h.

◆ Allocate()

FlowTableKSyncEntry * KSyncFlowEntryFreeList::Allocate ( const KSyncEntry key)

Definition at line 767 of file flowtable_ksync.cc.

Here is the call graph for this function:

◆ DISALLOW_COPY_AND_ASSIGN()

KSyncFlowEntryFreeList::DISALLOW_COPY_AND_ASSIGN ( KSyncFlowEntryFreeList  )
private

◆ Free()

void KSyncFlowEntryFreeList::Free ( FlowTableKSyncEntry flow)

Definition at line 793 of file flowtable_ksync.cc.

Here is the call graph for this function:

◆ free_count()

uint32_t KSyncFlowEntryFreeList::free_count ( ) const
inline

Definition at line 197 of file flowtable_ksync.h.

◆ Grow()

void KSyncFlowEntryFreeList::Grow ( )

Definition at line 756 of file flowtable_ksync.cc.

◆ max_count()

uint32_t KSyncFlowEntryFreeList::max_count ( ) const
inline

Definition at line 196 of file flowtable_ksync.h.

◆ Reset() [1/2]

void KSyncFlowEntryFreeList::Reset ( )

◆ Reset() [2/2]

void KSyncFlowEntryFreeList::Reset ( FlowEntryPtr  fe,
uint32_t  hash_id 
)

◆ total_alloc()

uint32_t KSyncFlowEntryFreeList::total_alloc ( ) const
inline

Definition at line 199 of file flowtable_ksync.h.

◆ total_free()

uint32_t KSyncFlowEntryFreeList::total_free ( ) const
inline

Definition at line 200 of file flowtable_ksync.h.

Member Data Documentation

◆ free_list_

FreeList KSyncFlowEntryFreeList::free_list_
private

Definition at line 208 of file flowtable_ksync.h.

◆ grow_pending_

bool KSyncFlowEntryFreeList::grow_pending_
private

Definition at line 205 of file flowtable_ksync.h.

◆ kGrowSize

const uint32_t KSyncFlowEntryFreeList::kGrowSize = (1 * 1000)
static

Definition at line 176 of file flowtable_ksync.h.

◆ kInitCount

const uint32_t KSyncFlowEntryFreeList::kInitCount = (25 * 1000)
static

Definition at line 174 of file flowtable_ksync.h.

◆ kMaxThreshold

const uint32_t KSyncFlowEntryFreeList::kMaxThreshold = (100 * 1000)
static

Definition at line 178 of file flowtable_ksync.h.

◆ kMinThreshold

const uint32_t KSyncFlowEntryFreeList::kMinThreshold = (4 * 1000)
static

Definition at line 177 of file flowtable_ksync.h.

◆ kTestInitCount

const uint32_t KSyncFlowEntryFreeList::kTestInitCount = (5 * 1000)
static

Definition at line 175 of file flowtable_ksync.h.

◆ max_count_

uint32_t KSyncFlowEntryFreeList::max_count_
private

Definition at line 204 of file flowtable_ksync.h.

◆ object_

FlowTableKSyncObject* KSyncFlowEntryFreeList::object_
private

Definition at line 203 of file flowtable_ksync.h.

◆ total_alloc_

uint64_t KSyncFlowEntryFreeList::total_alloc_
private

Definition at line 206 of file flowtable_ksync.h.

◆ total_free_

uint64_t KSyncFlowEntryFreeList::total_free_
private

Definition at line 207 of file flowtable_ksync.h.


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