OpenSDN source code
|
#include <flow_table.h>
Classes | |
struct | LinkLocalFlowInfo |
Public Types | |
typedef std::map< FlowKey, FlowEntry *, Inet4FlowKeyCmp > | FlowEntryMap |
typedef std::pair< FlowKey, FlowEntry * > | FlowEntryMapPair |
typedef boost::function< bool(FlowEntry *flow)> | FlowEntryCb |
typedef std::vector< FlowEntryPtr > | FlowIndexTree |
typedef std::map< int, LinkLocalFlowInfo > | LinkLocalFlowInfoMap |
typedef std::pair< int, LinkLocalFlowInfo > | LinkLocalFlowInfoPair |
Public Member Functions | |
FlowTable (Agent *agent, uint16_t table_index) | |
virtual | ~FlowTable () |
void | Init () |
void | InitDone () |
void | Shutdown () |
void | set_ksync_object (FlowTableKSyncObject *obj) |
FlowTableKSyncObject * | ksync_object () const |
FlowEntry * | Locate (FlowEntry *flow, uint64_t t) |
FlowEntry * | Find (const FlowKey &key) |
void | Add (FlowEntry *flow, FlowEntry *rflow) |
void | Update (FlowEntry *flow, FlowEntry *rflow) |
bool | Delete (const FlowKey &key, bool del_reverse_flow) |
void | DeleteAll () |
void | DeleteFlow (const AclDBEntry *acl, const FlowKey &key, AclEntryIDList &id_list) |
Agent * | agent () const |
uint16_t | table_index () const |
size_t | Size () |
FlowTable::FlowEntryMap::iterator | begin () |
FlowTable::FlowEntryMap::iterator | end () |
const LinkLocalFlowInfoMap & | linklocal_flow_info_map () |
void | AddLinkLocalFlowInfo (int fd, uint32_t index, const FlowKey &key, const uint64_t timestamp) |
void | DelLinkLocalFlowInfo (int fd) |
void | Copy (FlowEntry *lhs, FlowEntry *rhs, bool update) |
void | SetAclFlowSandeshData (const AclDBEntry *acl, AclFlowResp &data, const int last_count) |
void | SetAceSandeshData (const AclDBEntry *acl, AclFlowCountResp &data, int ace_id) |
void | RecomputeFlow (FlowEntry *flow) |
void | DeleteMessage (FlowEntry *flow) |
void | DeleteVrf (VrfEntry *vrf) |
void | HandleRevaluateDBEntry (const DBEntry *entry, FlowEntry *flow, bool active_flow, bool deleted_flow) |
void | HandleKSyncError (FlowEntry *flow, FlowTableKSyncEntry *ksync_entry, int ksync_error, uint32_t flow_handle, uint32_t gen_id) |
boost::uuids::uuid | rand_gen () |
void | UpdateKSync (FlowEntry *flow, bool update) |
void | DeleteKSync (FlowEntry *flow) |
void | GrowFreeList () |
FlowEntryFreeList * | free_list () |
void | ProcessKSyncFlowEvent (const FlowEventKSync *req, FlowEntry *flow) |
bool | ProcessFlowEvent (const FlowEvent *req, FlowEntry *flow, FlowEntry *rflow) |
void | PopulateFlowEntriesUsingKey (const FlowKey &key, bool reverse_flow, FlowEntry **flow, FlowEntry **rflow) |
bool | ConcurrencyCheck (int task_id, bool check_task_instance) |
bool | ConcurrencyCheck (int task_id) |
int | flow_task_id () const |
int | flow_update_task_id () const |
int | flow_delete_task_id () const |
int | flow_ksync_task_id () const |
int | flow_logging_task_id () const |
Static Public Member Functions | |
static const char * | TaskName () |
static void | GetMutexSeq (tbb::mutex &mutex1, tbb::mutex &mutex2, tbb::mutex **mutex_ptr_1, tbb::mutex **mutex_ptr_2) |
static void | GetFlowSandeshActionParams (const FlowAction &action_info, std::string &action_str) |
Static Public Attributes | |
static const uint32_t | kPortNatFlowTableInstance = 0 |
static const uint32_t | kInvalidFlowTableInstance = 0xFF |
Private Member Functions | |
void | DisableKSyncSend (FlowEntry *flow, uint32_t evict_gen_id) |
bool | IsEvictedFlow (const FlowKey &key) |
void | DeleteFlowUveInfo (FlowEntry *fe) |
void | DeleteInternal (FlowEntry *fe, uint64_t t, const RevFlowDepParams &p) |
void | DeleteFlowInfo (FlowEntry *fe, const RevFlowDepParams ¶ms) |
void | AddFlowInfo (FlowEntry *fe) |
void | UpdateReverseFlow (FlowEntry *flow, FlowEntry *rflow) |
void | UpdateUnLocked (FlowEntry *flow, FlowEntry *rflow) |
void | AddInternal (FlowEntry *flow, FlowEntry *new_flow, FlowEntry *rflow, FlowEntry *new_rflow, bool fwd_flow_update, bool rev_flow_update) |
void | Add (FlowEntry *flow, FlowEntry *new_flow, FlowEntry *rflow, FlowEntry *new_rflow, bool fwd_flow_update, bool rev_flow_update) |
void | EvictFlow (FlowEntry *flow, FlowEntry *rflow, uint32_t evict_gen_id) |
bool | DeleteFlows (FlowEntry *flow, FlowEntry *rflow) |
bool | DeleteUnLocked (const FlowKey &key, bool del_reverse_flow) |
bool | DeleteUnLocked (bool del_reverse_flow, FlowEntry *flow, FlowEntry *rflow) |
void | ReleasePort (FlowEntry *flow, bool evict) |
DISALLOW_COPY_AND_ASSIGN (FlowTable) | |
Private Attributes | |
Agent * | agent_ |
boost::uuids::random_generator | rand_gen_ |
uint16_t | table_index_ |
FlowTableKSyncObject * | ksync_object_ |
FlowEntryMap | flow_entry_map_ |
FlowIndexTree | flow_index_tree_ |
LinkLocalFlowInfoMap | linklocal_flow_info_map_ |
FlowEntryFreeList | free_list_ |
tbb::mutex | mutex_ |
int | flow_task_id_ |
int | flow_update_task_id_ |
int | flow_delete_task_id_ |
int | flow_ksync_task_id_ |
int | flow_logging_task_id_ |
Friends | |
class | FlowStatsCollector |
class | PktSandeshFlow |
class | PktSandeshFlowStats |
class | FetchFlowRecord |
class | PktFlowInfo |
void | intrusive_ptr_release (FlowEntry *fe) |
Definition at line 152 of file flow_table.h.
typedef boost::function<bool(FlowEntry *flow)> FlowTable::FlowEntryCb |
Definition at line 159 of file flow_table.h.
typedef std::map<FlowKey, FlowEntry *, Inet4FlowKeyCmp> FlowTable::FlowEntryMap |
Definition at line 157 of file flow_table.h.
typedef std::pair<FlowKey, FlowEntry *> FlowTable::FlowEntryMapPair |
Definition at line 158 of file flow_table.h.
typedef std::vector<FlowEntryPtr> FlowTable::FlowIndexTree |
Definition at line 160 of file flow_table.h.
typedef std::map<int, LinkLocalFlowInfo> FlowTable::LinkLocalFlowInfoMap |
Definition at line 170 of file flow_table.h.
typedef std::pair<int, LinkLocalFlowInfo> FlowTable::LinkLocalFlowInfoPair |
Definition at line 171 of file flow_table.h.
FlowTable::FlowTable | ( | Agent * | agent, |
uint16_t | table_index | ||
) |
Definition at line 58 of file flow_table.cc.
|
virtual |
Definition at line 72 of file flow_table.cc.
|
private |
|
private |
void FlowTable::AddLinkLocalFlowInfo | ( | int | fd, |
uint32_t | index, | ||
const FlowKey & | key, | ||
const uint64_t | timestamp | ||
) |
Definition at line 753 of file flow_table.cc.
|
inline |
Definition at line 197 of file flow_table.h.
|
inline |
Definition at line 200 of file flow_table.h.
bool FlowTable::ConcurrencyCheck | ( | int | task_id, |
bool | check_task_instance | ||
) |
bool FlowTable::ConcurrencyCheck | ( | int | task_id | ) |
bool FlowTable::Delete | ( | const FlowKey & | key, |
bool | del_reverse_flow | ||
) |
void FlowTable::DeleteAll | ( | ) |
void FlowTable::DeleteFlow | ( | const AclDBEntry * | acl, |
const FlowKey & | key, | ||
AclEntryIDList & | id_list | ||
) |
|
private |
|
private |
|
private |
void FlowTable::DeleteKSync | ( | FlowEntry * | flow | ) |
void FlowTable::DeleteMessage | ( | FlowEntry * | flow | ) |
|
private |
void FlowTable::DeleteVrf | ( | VrfEntry * | vrf | ) |
void FlowTable::DelLinkLocalFlowInfo | ( | int | fd | ) |
Definition at line 766 of file flow_table.cc.
|
private |
|
private |
|
inline |
Definition at line 203 of file flow_table.h.
|
inline |
Definition at line 254 of file flow_table.h.
|
inline |
Definition at line 255 of file flow_table.h.
|
inline |
Definition at line 256 of file flow_table.h.
|
inline |
Definition at line 252 of file flow_table.h.
|
inline |
Definition at line 253 of file flow_table.h.
|
inline |
Definition at line 239 of file flow_table.h.
|
static |
|
static |
Definition at line 122 of file flow_table.cc.
void FlowTable::GrowFreeList | ( | ) |
void FlowTable::HandleKSyncError | ( | FlowEntry * | flow, |
FlowTableKSyncEntry * | ksync_entry, | ||
int | ksync_error, | ||
uint32_t | flow_handle, | ||
uint32_t | gen_id | ||
) |
void FlowTable::Init | ( | ) |
void FlowTable::InitDone | ( | ) |
Definition at line 86 of file flow_table.cc.
|
private |
|
inline |
Definition at line 182 of file flow_table.h.
|
inline |
Definition at line 207 of file flow_table.h.
void FlowTable::ProcessKSyncFlowEvent | ( | const FlowEventKSync * | req, |
FlowEntry * | flow | ||
) |
boost::uuids::uuid FlowTable::rand_gen | ( | ) |
Definition at line 514 of file flow_table.cc.
void FlowTable::RecomputeFlow | ( | FlowEntry * | flow | ) |
|
private |
|
inline |
Definition at line 181 of file flow_table.h.
void FlowTable::SetAceSandeshData | ( | const AclDBEntry * | acl, |
AclFlowCountResp & | data, | ||
int | ace_id | ||
) |
void FlowTable::SetAclFlowSandeshData | ( | const AclDBEntry * | acl, |
AclFlowResp & | data, | ||
const int | last_count | ||
) |
void FlowTable::Shutdown | ( | ) |
Definition at line 89 of file flow_table.cc.
|
inline |
Definition at line 199 of file flow_table.h.
|
inline |
Definition at line 198 of file flow_table.h.
|
inlinestatic |
Definition at line 214 of file flow_table.h.
void FlowTable::UpdateKSync | ( | FlowEntry * | flow, |
bool | update | ||
) |
|
friend |
Definition at line 265 of file flow_table.h.
|
friend |
Definition at line 262 of file flow_table.h.
|
friend |
Definition at line 570 of file flow_entry.cc.
|
friend |
Definition at line 266 of file flow_table.h.
|
friend |
Definition at line 263 of file flow_table.h.
|
friend |
Definition at line 264 of file flow_table.h.
|
private |
Definition at line 293 of file flow_table.h.
|
private |
Definition at line 306 of file flow_table.h.
|
private |
Definition at line 297 of file flow_table.h.
|
private |
Definition at line 299 of file flow_table.h.
|
private |
Definition at line 307 of file flow_table.h.
|
private |
Definition at line 308 of file flow_table.h.
|
private |
Definition at line 304 of file flow_table.h.
|
private |
Definition at line 305 of file flow_table.h.
|
private |
Definition at line 302 of file flow_table.h.
|
static |
Definition at line 155 of file flow_table.h.
|
static |
Definition at line 154 of file flow_table.h.
|
private |
Definition at line 296 of file flow_table.h.
|
private |
Definition at line 301 of file flow_table.h.
|
private |
Definition at line 303 of file flow_table.h.
|
private |
Definition at line 294 of file flow_table.h.
|
private |
Definition at line 295 of file flow_table.h.