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

#include <flow_mgmt.h>

Collaboration diagram for FlowMgmtManager:

Classes

struct  FlowEntryRefCmp
 

Public Types

typedef boost::shared_ptr
< FlowMgmtRequest
FlowMgmtRequestPtr
 
typedef WorkQueue
< FlowMgmtRequestPtr
FlowMgmtQueue
 
typedef std::map< FlowEntryPtr,
FlowEntryInfo, FlowEntryRefCmp
FlowEntryTree
 

Public Member Functions

 FlowMgmtManager (Agent *agent, uint16_t table_index)
 
virtual ~FlowMgmtManager ()
 
void Init ()
 
void Shutdown ()
 
bool RequestHandler (FlowMgmtRequestPtr req)
 
bool DBRequestHandler (FlowMgmtRequestPtr req)
 
bool DBRequestHandler (FlowMgmtRequest *req, const DBEntry *entry)
 
bool BgpAsAServiceRequestHandler (FlowMgmtRequest *req)
 
bool DbClientHandler (const DBEntry *entry)
 
void EnqueueFlowEvent (FlowEvent *event)
 
void NonOperEntryEvent (FlowEvent::Event event, FlowEntry *flow)
 
void DBEntryEvent (FlowEvent::Event event, FlowMgmtKey *key, FlowEntry *flow)
 
void FreeDBEntryEvent (FlowEvent::Event event, FlowMgmtKey *key, uint32_t gen_id)
 
Agentagent () const
 
uint16_t table_index () const
 
void AddEvent (FlowEntry *low)
 
void DeleteEvent (FlowEntry *flow, const RevFlowDepParams &params)
 
void FlowStatsUpdateEvent (FlowEntry *flow, uint32_t bytes, uint32_t packets, uint32_t oflow_bytes, const boost::uuids::uuid &u)
 
void AddDBEntryEvent (const DBEntry *entry, uint32_t gen_id)
 
void ChangeDBEntryEvent (const DBEntry *entry, uint32_t gen_id)
 
void DeleteDBEntryEvent (const DBEntry *entry, uint32_t gen_id)
 
void RouteNHChangeEvent (const DBEntry *entry, uint32_t gen_id)
 
void RetryVrfDeleteEvent (const VrfEntry *vrf)
 
void RetryVrfDelete (uint32_t vrf_id)
 
void DummyEvent ()
 
void VnFlowCounters (const VnEntry *vn, uint32_t *ingress_flow_count, uint32_t *egress_flow_count)
 
void InterfaceFlowCount (const Interface *itf, uint64_t *created, uint64_t *aged, uint32_t *active_flows)
 
bool HasVrfFlows (uint32_t vrf)
 
FlowMgmtDbClientflow_mgmt_dbclient () const
 
const FlowMgmtQueuerequest_queue () const
 
const FlowMgmtQueuelog_queue () const
 
void DisableWorkQueue (bool disable)
 
void BgpAsAServiceNotify (const boost::uuids::uuid &vm_uuid, uint32_t source_port)
 
void BgpAsAServiceHealthCheckNotify (const boost::uuids::uuid &vm_uuid, uint32_t source_port, const boost::uuids::uuid &hc_uuid, bool add)
 
void EnqueueUveAddEvent (const FlowEntry *flow) const
 
void EnqueueUveDeleteEvent (const FlowEntry *flow) const
 
void FlowUpdateQueueDisable (bool val)
 
size_t FlowUpdateQueueLength ()
 
size_t FlowDBQueueLength ()
 
InetRouteFlowMgmtTreeip4_route_flow_mgmt_tree ()
 
BgpAsAServiceFlowMgmtKeyFindBgpAsAServiceInfo (FlowEntry *flow, BgpAsAServiceFlowMgmtKey &key)
 

Static Public Member Functions

static void InitLogQueue (Agent *agent)
 
static void ShutdownLogQueue ()
 
static void LogFlowUnlocked (FlowEntry *flow, const std::string &op)
 
static bool LogHandler (FlowMgmtRequestPtr req)
 
static bool ProcessEvent (FlowMgmtRequest *req, FlowMgmtKey *key, FlowMgmtTree *tree)
 

Private Member Functions

void AddFlow (FlowEntryPtr &flow)
 
void DeleteFlow (FlowEntryPtr &flow, const RevFlowDepParams &p)
 
void UpdateFlowStats (FlowEntryPtr &flow, uint32_t bytes, uint32_t packets, uint32_t oflow_bytes, const boost::uuids::uuid &u)
 
void AddFlowMgmtKey (FlowEntry *flow, FlowEntryInfo *info, FlowMgmtKey *key, FlowMgmtKey *old_key)
 
void DeleteFlowMgmtKey (FlowEntry *flow, FlowEntryInfo *info, FlowMgmtKey *key, FlowMgmtKeyNode *node)
 
FlowEntryInfoFindFlowEntryInfo (const FlowEntryPtr &flow)
 
FlowEntryInfoLocateFlowEntryInfo (FlowEntryPtr &flow)
 
void DeleteFlowEntryInfo (FlowEntryPtr &flow)
 
void MakeFlowMgmtKeyTree (FlowEntry *flow, FlowMgmtKeyTree *tree)
 
void SetAceSandeshData (const AclDBEntry *acl, AclFlowCountResp &data, const std::string &ace_id)
 
void SetAclFlowSandeshData (const AclDBEntry *acl, AclFlowResp &data, const int last_count)
 
void ControllerNotify (uint8_t index)
 
 DISALLOW_COPY_AND_ASSIGN (FlowMgmtManager)
 

Private Attributes

Agentagent_
 
uint16_t table_index_
 
AclFlowMgmtTree acl_flow_mgmt_tree_
 
InterfaceFlowMgmtTree interface_flow_mgmt_tree_
 
VnFlowMgmtTree vn_flow_mgmt_tree_
 
InetRouteFlowMgmtTree ip4_route_flow_mgmt_tree_
 
InetRouteFlowMgmtTree ip6_route_flow_mgmt_tree_
 
BridgeRouteFlowMgmtTree bridge_route_flow_mgmt_tree_
 
VrfFlowMgmtTree vrf_flow_mgmt_tree_
 
NhFlowMgmtTree nh_flow_mgmt_tree_
 
boost::scoped_ptr
< BgpAsAServiceFlowMgmtTree
bgp_as_a_service_flow_mgmt_tree_ [MAX_XMPP_SERVERS]
 
std::unique_ptr< FlowMgmtDbClientflow_mgmt_dbclient_
 
FlowMgmtQueue request_queue_
 
FlowMgmtQueue db_event_queue_
 

Static Private Attributes

static FlowMgmtQueuelog_queue_
 

Detailed Description

Definition at line 238 of file flow_mgmt.h.

Member Typedef Documentation

Definition at line 240 of file flow_mgmt.h.

Constructor & Destructor Documentation

FlowMgmtManager::FlowMgmtManager ( Agent agent,
uint16_t  table_index 
)

Definition at line 21 of file flow_mgmt.cc.

Here is the call graph for this function:

virtual FlowMgmtManager::~FlowMgmtManager ( )
inlinevirtual

Definition at line 259 of file flow_mgmt.h.

Member Function Documentation

void FlowMgmtManager::AddDBEntryEvent ( const DBEntry entry,
uint32_t  gen_id 
)

Definition at line 203 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::AddEvent ( FlowEntry low)

Definition at line 147 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::AddFlow ( FlowEntryPtr flow)
private

Definition at line 582 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::AddFlowMgmtKey ( FlowEntry flow,
FlowEntryInfo info,
FlowMgmtKey key,
FlowMgmtKey old_key 
)
private

Definition at line 756 of file flow_mgmt.cc.

Here is the call graph for this function:

Agent* FlowMgmtManager::agent ( ) const
inline

Definition at line 283 of file flow_mgmt.h.

void FlowMgmtManager::BgpAsAServiceHealthCheckNotify ( const boost::uuids::uuid vm_uuid,
uint32_t  source_port,
const boost::uuids::uuid hc_uuid,
bool  add 
)

Definition at line 99 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::BgpAsAServiceNotify ( const boost::uuids::uuid vm_uuid,
uint32_t  source_port 
)

Definition at line 92 of file flow_mgmt.cc.

Here is the call graph for this function:

bool FlowMgmtManager::BgpAsAServiceRequestHandler ( FlowMgmtRequest req)

Definition at line 359 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::ChangeDBEntryEvent ( const DBEntry entry,
uint32_t  gen_id 
)

Definition at line 209 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::ControllerNotify ( uint8_t  index)
private

Definition at line 111 of file flow_mgmt.cc.

Here is the call graph for this function:

bool FlowMgmtManager::DbClientHandler ( const DBEntry entry)
void FlowMgmtManager::DBEntryEvent ( FlowEvent::Event  event,
FlowMgmtKey key,
FlowEntry flow 
)

Definition at line 243 of file flow_mgmt.cc.

Here is the call graph for this function:

bool FlowMgmtManager::DBRequestHandler ( FlowMgmtRequestPtr  req)

Definition at line 463 of file flow_mgmt.cc.

bool FlowMgmtManager::DBRequestHandler ( FlowMgmtRequest req,
const DBEntry entry 
)

Definition at line 303 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::DeleteDBEntryEvent ( const DBEntry entry,
uint32_t  gen_id 
)

Definition at line 216 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::DeleteEvent ( FlowEntry flow,
const RevFlowDepParams params 
)

Definition at line 159 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::DeleteFlow ( FlowEntryPtr flow,
const RevFlowDepParams p 
)
private

Definition at line 646 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::DeleteFlowEntryInfo ( FlowEntryPtr flow)
private

Definition at line 740 of file flow_mgmt.cc.

void FlowMgmtManager::DeleteFlowMgmtKey ( FlowEntry flow,
FlowEntryInfo info,
FlowMgmtKey key,
FlowMgmtKeyNode node 
)
private

Definition at line 844 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::DisableWorkQueue ( bool  disable)
inline

Definition at line 312 of file flow_mgmt.h.

Here is the call graph for this function:

FlowMgmtManager::DISALLOW_COPY_AND_ASSIGN ( FlowMgmtManager  )
private
void FlowMgmtManager::DummyEvent ( )

Definition at line 198 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::EnqueueFlowEvent ( FlowEvent event)

Definition at line 231 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::EnqueueUveAddEvent ( const FlowEntry flow) const

Definition at line 537 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::EnqueueUveDeleteEvent ( const FlowEntry flow) const

Definition at line 565 of file flow_mgmt.cc.

Here is the call graph for this function:

BgpAsAServiceFlowMgmtKey * FlowMgmtManager::FindBgpAsAServiceInfo ( FlowEntry flow,
BgpAsAServiceFlowMgmtKey key 
)

Definition at line 725 of file flow_mgmt.cc.

Here is the call graph for this function:

FlowEntryInfo * FlowMgmtManager::FindFlowEntryInfo ( const FlowEntryPtr flow)
private

Definition at line 710 of file flow_mgmt.cc.

FlowMgmtDbClient* FlowMgmtManager::flow_mgmt_dbclient ( ) const
inline

Definition at line 306 of file flow_mgmt.h.

size_t FlowMgmtManager::FlowDBQueueLength ( )

Definition at line 267 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::FlowStatsUpdateEvent ( FlowEntry flow,
uint32_t  bytes,
uint32_t  packets,
uint32_t  oflow_bytes,
const boost::uuids::uuid u 
)

Definition at line 174 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::FlowUpdateQueueDisable ( bool  val)

Definition at line 258 of file flow_mgmt.cc.

Here is the call graph for this function:

size_t FlowMgmtManager::FlowUpdateQueueLength ( )

Definition at line 263 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::FreeDBEntryEvent ( FlowEvent::Event  event,
FlowMgmtKey key,
uint32_t  gen_id 
)

Definition at line 251 of file flow_mgmt.cc.

Here is the call graph for this function:

bool FlowMgmtManager::HasVrfFlows ( uint32_t  vrf)

Definition at line 680 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::Init ( )

Definition at line 49 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::InitLogQueue ( Agent agent)
static

Definition at line 75 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::InterfaceFlowCount ( const Interface itf,
uint64_t *  created,
uint64_t *  aged,
uint32_t *  active_flows 
)

Definition at line 702 of file flow_mgmt.cc.

Here is the call graph for this function:

InetRouteFlowMgmtTree* FlowMgmtManager::ip4_route_flow_mgmt_tree ( )
inline

Definition at line 325 of file flow_mgmt.h.

FlowEntryInfo * FlowMgmtManager::LocateFlowEntryInfo ( FlowEntryPtr flow)
private

Definition at line 715 of file flow_mgmt.cc.

Here is the call graph for this function:

const FlowMgmtQueue* FlowMgmtManager::log_queue ( ) const
inline

Definition at line 311 of file flow_mgmt.h.

void FlowMgmtManager::LogFlowUnlocked ( FlowEntry flow,
const std::string &  op 
)
static

Definition at line 510 of file flow_mgmt.cc.

Here is the call graph for this function:

bool FlowMgmtManager::LogHandler ( FlowMgmtRequestPtr  req)
static

Definition at line 481 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::MakeFlowMgmtKeyTree ( FlowEntry flow,
FlowMgmtKeyTree tree 
)
private

Definition at line 519 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::NonOperEntryEvent ( FlowEvent::Event  event,
FlowEntry flow 
)

Definition at line 235 of file flow_mgmt.cc.

Here is the call graph for this function:

bool FlowMgmtManager::ProcessEvent ( FlowMgmtRequest req,
FlowMgmtKey key,
FlowMgmtTree tree 
)
static

Definition at line 273 of file flow_mgmt.cc.

Here is the call graph for this function:

const FlowMgmtQueue* FlowMgmtManager::request_queue ( ) const
inline

Definition at line 310 of file flow_mgmt.h.

bool FlowMgmtManager::RequestHandler ( FlowMgmtRequestPtr  req)

Definition at line 393 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::RetryVrfDelete ( uint32_t  vrf_id)

Definition at line 505 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::RetryVrfDeleteEvent ( const VrfEntry vrf)

Definition at line 192 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::RouteNHChangeEvent ( const DBEntry entry,
uint32_t  gen_id 
)

Definition at line 223 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::SetAceSandeshData ( const AclDBEntry acl,
AclFlowCountResp &  data,
const std::string &  ace_id 
)
private

Definition at line 119 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::SetAclFlowSandeshData ( const AclDBEntry acl,
AclFlowResp &  data,
const int  last_count 
)
private

Definition at line 132 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::Shutdown ( )

Definition at line 69 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::ShutdownLogQueue ( )
static

Definition at line 84 of file flow_mgmt.cc.

Here is the call graph for this function:

uint16_t FlowMgmtManager::table_index ( ) const
inline

Definition at line 284 of file flow_mgmt.h.

void FlowMgmtManager::UpdateFlowStats ( FlowEntryPtr flow,
uint32_t  bytes,
uint32_t  packets,
uint32_t  oflow_bytes,
const boost::uuids::uuid u 
)
private

Definition at line 672 of file flow_mgmt.cc.

Here is the call graph for this function:

void FlowMgmtManager::VnFlowCounters ( const VnEntry vn,
uint32_t *  ingress_flow_count,
uint32_t *  egress_flow_count 
)

Definition at line 696 of file flow_mgmt.cc.

Here is the call graph for this function:

Member Data Documentation

AclFlowMgmtTree FlowMgmtManager::acl_flow_mgmt_tree_
private

Definition at line 361 of file flow_mgmt.h.

Agent* FlowMgmtManager::agent_
private

Definition at line 359 of file flow_mgmt.h.

boost::scoped_ptr<BgpAsAServiceFlowMgmtTree> FlowMgmtManager::bgp_as_a_service_flow_mgmt_tree_[MAX_XMPP_SERVERS]
private

Definition at line 369 of file flow_mgmt.h.

BridgeRouteFlowMgmtTree FlowMgmtManager::bridge_route_flow_mgmt_tree_
private

Definition at line 366 of file flow_mgmt.h.

FlowMgmtQueue FlowMgmtManager::db_event_queue_
private

Definition at line 372 of file flow_mgmt.h.

std::unique_ptr<FlowMgmtDbClient> FlowMgmtManager::flow_mgmt_dbclient_
private

Definition at line 370 of file flow_mgmt.h.

InterfaceFlowMgmtTree FlowMgmtManager::interface_flow_mgmt_tree_
private

Definition at line 362 of file flow_mgmt.h.

InetRouteFlowMgmtTree FlowMgmtManager::ip4_route_flow_mgmt_tree_
private

Definition at line 364 of file flow_mgmt.h.

InetRouteFlowMgmtTree FlowMgmtManager::ip6_route_flow_mgmt_tree_
private

Definition at line 365 of file flow_mgmt.h.

FlowMgmtManager::FlowMgmtQueue * FlowMgmtManager::log_queue_
staticprivate

Definition at line 373 of file flow_mgmt.h.

NhFlowMgmtTree FlowMgmtManager::nh_flow_mgmt_tree_
private

Definition at line 368 of file flow_mgmt.h.

FlowMgmtQueue FlowMgmtManager::request_queue_
private

Definition at line 371 of file flow_mgmt.h.

uint16_t FlowMgmtManager::table_index_
private

Definition at line 360 of file flow_mgmt.h.

VnFlowMgmtTree FlowMgmtManager::vn_flow_mgmt_tree_
private

Definition at line 363 of file flow_mgmt.h.

VrfFlowMgmtTree FlowMgmtManager::vrf_flow_mgmt_tree_
private

Definition at line 367 of file flow_mgmt.h.


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