OpenSDN source code
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, NodeFreeList
 

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

◆ FreeList

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

Definition at line 101 of file flow_table.h.

◆ Node

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::FlowEntryFreeList ( FlowTable table)

Definition at line 973 of file flow_table.cc.

Here is the call graph for this function:

◆ ~FlowEntryFreeList()

FlowEntryFreeList::~FlowEntryFreeList ( )
virtual

Definition at line 987 of file flow_table.cc.

Member Function Documentation

◆ alloc_count()

uint32_t FlowEntryFreeList::alloc_count ( ) const
inline

Definition at line 111 of file flow_table.h.

◆ Allocate()

FlowEntry * FlowEntryFreeList::Allocate ( const FlowKey key)

Definition at line 1009 of file flow_table.cc.

Here is the call graph for this function:

◆ DISALLOW_COPY_AND_ASSIGN()

FlowEntryFreeList::DISALLOW_COPY_AND_ASSIGN ( FlowEntryFreeList  )
private

◆ Free()

void FlowEntryFreeList::Free ( FlowEntry flow)

Definition at line 1031 of file flow_table.cc.

Here is the call graph for this function:

◆ free_count()

uint32_t FlowEntryFreeList::free_count ( ) const
inline

Definition at line 110 of file flow_table.h.

◆ Grow()

void FlowEntryFreeList::Grow ( )

Definition at line 997 of file flow_table.cc.

Here is the call graph for this function:

◆ max_count()

uint32_t FlowEntryFreeList::max_count ( ) const
inline

Definition at line 109 of file flow_table.h.

◆ total_alloc()

uint32_t FlowEntryFreeList::total_alloc ( ) const
inline

Definition at line 112 of file flow_table.h.

◆ total_free()

uint32_t FlowEntryFreeList::total_free ( ) const
inline

Definition at line 113 of file flow_table.h.

Member Data Documentation

◆ free_list_

FreeList FlowEntryFreeList::free_list_
private

Definition at line 120 of file flow_table.h.

◆ grow_pending_

bool FlowEntryFreeList::grow_pending_
private

Definition at line 117 of file flow_table.h.

◆ kGrowSize

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

Definition at line 94 of file flow_table.h.

◆ kInitCount

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

Definition at line 92 of file flow_table.h.

◆ kMaxThreshold

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

Definition at line 96 of file flow_table.h.

◆ kMinThreshold

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

Definition at line 95 of file flow_table.h.

◆ kTestInitCount

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

Definition at line 93 of file flow_table.h.

◆ max_count_

uint32_t FlowEntryFreeList::max_count_
private

Definition at line 116 of file flow_table.h.

◆ table_

FlowTable* FlowEntryFreeList::table_
private

Definition at line 115 of file flow_table.h.

◆ total_alloc_

uint64_t FlowEntryFreeList::total_alloc_
private

Definition at line 118 of file flow_table.h.

◆ total_free_

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: