OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FlowEntryFreeList Class Reference

#include <flow_table.h>

Collaboration diagram for FlowEntryFreeList:

Public Types

typedef
boost::intrusive::member_hook
< FlowEntry,
boost::intrusive::list_member_hook
<>,&FlowEntry::free_list_node_
Node
 
typedef boost::intrusive::list
< FlowEntry, Node
FreeList
 

Public Member Functions

 FlowEntryFreeList (FlowTable *table)
 
virtual ~FlowEntryFreeList ()
 
FlowEntryAllocate (const FlowKey &key)
 
void Free (FlowEntry *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 (FlowEntryFreeList)
 

Private Attributes

FlowTabletable_
 
uint32_t max_count_
 
bool grow_pending_
 
uint64_t total_alloc_
 
uint64_t total_free_
 
FreeList free_list_
 

Detailed Description

Definition at line 90 of file flow_table.h.

Member Typedef Documentation

typedef boost::intrusive::list<FlowEntry, Node> FlowEntryFreeList::FreeList

Definition at line 101 of file flow_table.h.

typedef boost::intrusive::member_hook<FlowEntry, boost::intrusive::list_member_hook<>, &FlowEntry::free_list_node_> FlowEntryFreeList::Node

Definition at line 100 of file flow_table.h.

Constructor & Destructor Documentation

FlowEntryFreeList::FlowEntryFreeList ( FlowTable table)

Definition at line 965 of file flow_table.cc.

Here is the call graph for this function:

FlowEntryFreeList::~FlowEntryFreeList ( )
virtual

Definition at line 979 of file flow_table.cc.

Member Function Documentation

uint32_t FlowEntryFreeList::alloc_count ( ) const
inline

Definition at line 111 of file flow_table.h.

FlowEntry * FlowEntryFreeList::Allocate ( const FlowKey key)

Definition at line 1001 of file flow_table.cc.

Here is the call graph for this function:

FlowEntryFreeList::DISALLOW_COPY_AND_ASSIGN ( FlowEntryFreeList  )
private
void FlowEntryFreeList::Free ( FlowEntry flow)

Definition at line 1023 of file flow_table.cc.

Here is the call graph for this function:

uint32_t FlowEntryFreeList::free_count ( ) const
inline

Definition at line 110 of file flow_table.h.

void FlowEntryFreeList::Grow ( )

Definition at line 989 of file flow_table.cc.

Here is the call graph for this function:

uint32_t FlowEntryFreeList::max_count ( ) const
inline

Definition at line 109 of file flow_table.h.

uint32_t FlowEntryFreeList::total_alloc ( ) const
inline

Definition at line 112 of file flow_table.h.

uint32_t FlowEntryFreeList::total_free ( ) const
inline

Definition at line 113 of file flow_table.h.

Member Data Documentation

FreeList FlowEntryFreeList::free_list_
private

Definition at line 120 of file flow_table.h.

bool FlowEntryFreeList::grow_pending_
private

Definition at line 117 of file flow_table.h.

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

Definition at line 94 of file flow_table.h.

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

Definition at line 92 of file flow_table.h.

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

Definition at line 96 of file flow_table.h.

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

Definition at line 95 of file flow_table.h.

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

Definition at line 93 of file flow_table.h.

uint32_t FlowEntryFreeList::max_count_
private

Definition at line 116 of file flow_table.h.

FlowTable* FlowEntryFreeList::table_
private

Definition at line 115 of file flow_table.h.

uint64_t FlowEntryFreeList::total_alloc_
private

Definition at line 118 of file flow_table.h.

uint64_t FlowEntryFreeList::total_free_
private

Definition at line 119 of file flow_table.h.


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