|
OpenSDN source code
|
#include <flow_stats_collector.h>


Classes | |
| class | AgeingTask |
Public Types | |
| typedef std::map< const FlowEntry *, FlowExportInfo > | FlowEntryTree |
| typedef WorkQueue< boost::shared_ptr< FlowExportReq > > | Queue |
Public Types inherited from StatsCollector | |
| enum | StatsInstance { FlowStatsCollector , AgentStatsCollector } |
Public Member Functions | |
| FlowStatsCollector (boost::asio::io_context &io, int intvl, uint32_t flow_cache_timeout, AgentUveBase *uve, uint32_t instance_id, FlowAgingTableKey *key, FlowStatsManager *aging_module, FlowStatsCollectorObject *obj) | |
| virtual | ~FlowStatsCollector () |
| uint64_t | flow_age_time_intvl () |
| void | set_flow_age_time_intvl (uint64_t interval) |
| uint32_t | flow_age_time_intvl_in_secs () const |
| uint64_t | flow_tcp_syn_age_time () const |
| void | set_flow_tcp_syn_age_time (uint64_t interval) |
| boost::uuids::uuid | rand_gen () |
| bool | Run () |
| bool | RunAgeingTask () |
| uint32_t | ProcessFlow (FlowExportInfoList::iterator &it, KSyncFlowMemory *ksync_obj, FlowExportInfo *info, uint64_t curr_time) |
| bool | AgeFlow (KSyncFlowMemory *ksync_obj, const vr_flow_entry *k_flow, const vr_flow_stats &k_stats, const KFlowData &kinfo, FlowExportInfo *info, uint64_t curr_time) |
| bool | EvictFlow (KSyncFlowMemory *ksync_obj, const vr_flow_entry *k_flow, uint16_t k_flow_flags, uint32_t flow_handle, uint16_t gen_id, FlowExportInfo *info, uint64_t curr_time) |
| uint32_t | RunAgeing (uint32_t max_count) |
| void | UpdateFlowAgeTime (uint64_t usecs) |
| void | UpdateFlowAgeTimeInSecs (uint32_t secs) |
| void | UpdateFloatingIpStats (const FlowExportInfo *flow, uint64_t bytes, uint64_t pkts) |
| void | UpdateStatsEvent (const FlowEntryPtr &flow, uint32_t bytes, uint32_t packets, uint32_t oflow_bytes, const boost::uuids::uuid &u) |
| void | Shutdown () |
| void | AddEvent (const FlowEntryPtr &flow) |
| void | DeleteEvent (const FlowEntryPtr &flow, const RevFlowDepParams ¶ms) |
| bool | FindFlowExportInfo (const FlowEntry *fe, FlowEntryTree::iterator &it) |
| FlowExportInfo * | FindFlowExportInfo (const FlowEntry *fe) |
| const FlowExportInfo * | FindFlowExportInfo (const FlowEntry *fe) const |
| size_t | Size () const |
| size_t | AgeTreeSize () const |
| void | NewFlow (FlowEntry *flow) |
| void | set_deleted (bool val) |
| bool | deleted () const |
| const FlowAgingTableKey & | flow_aging_key () const |
| int | task_id () const |
| uint32_t | instance_id () const |
| const Queue * | queue () const |
Public Member Functions inherited from StatsCollector | |
| StatsCollector (int task_id, int32_t instance, boost::asio::io_service &io, int exp, std::string timer_name) | |
| virtual | ~StatsCollector () |
| void | InitDone () |
| void | Shutdown () |
| void | TestStartStopTimer (bool stop) |
| int | expiry_time () const |
| void | set_expiry_time (int time) |
| void | RescheduleTimer (int time) |
Static Public Member Functions | |
| static uint64_t | GetFlowStats (const uint16_t &oflow_data, const uint32_t &data) |
Static Public Attributes | |
| static const uint64_t | FlowAgeTime = 1000000 * 180 |
| static const uint64_t | FlowTcpSynAgeTime = 1000000 * 180 |
| static const uint32_t | kFlowScanTime = 25 |
| static const uint32_t | kFlowStatsTimerInterval = 100 |
| static const uint32_t | kMinFlowsPerTimer = 3000 |
| static const uint32_t | kFlowsPerTask = 256 |
| static const uint64_t | kFlowDeleteRetryTime = (5 * 1000 * 1000) |
| static const uint32_t | kDefaultFlowSamplingThreshold = 500 |
| static const uint8_t | kMaxFlowMsgsPerSend = 16 |
Private Member Functions | |
| uint32_t | TimersPerScan () |
| void | UpdateEntriesToVisit () |
| void | EvictedFlowStatsUpdate (const FlowEntryPtr &flow, uint32_t bytes, uint32_t packets, uint32_t oflow_bytes, const boost::uuids::uuid &u) |
| void | UpdateFlowStats (FlowExportInfo *info, uint64_t teardown_time) |
| void | UpdateFlowStatsInternalLocked (FlowExportInfo *info, uint32_t bytes, uint16_t oflow_bytes, uint32_t pkts, uint16_t oflow_pkts, uint64_t time, bool teardown_time) |
| void | UpdateFlowStatsInternal (FlowExportInfo *info, uint32_t bytes, uint16_t oflow_bytes, uint32_t pkts, uint16_t oflow_pkts, uint64_t time, bool teardown_time) |
| void | FlowDeleteEnqueue (FlowExportInfo *info, uint64_t t) |
| void | FlowEvictEnqueue (FlowExportInfo *info, uint64_t t, uint32_t flow_handle, uint16_t gen_id) |
| void | UpdateThreshold (uint32_t new_value) |
| void | UpdateInterVnStats (FlowExportInfo *info, uint64_t bytes, uint64_t pkts) |
| void | UpdateVmiTagBasedStats (FlowExportInfo *info, uint64_t bytes, uint64_t pkts) |
| bool | ShouldBeAged (FlowExportInfo *info, const vr_flow_entry *k_flow, const vr_flow_stats &k_stats, uint64_t curr_time) |
| uint64_t | GetUpdatedFlowPackets (const FlowExportInfo *stats, uint64_t k_flow_pkts) |
| uint64_t | GetUpdatedFlowBytes (const FlowExportInfo *stats, uint64_t k_flow_bytes) |
| InterfaceUveTable::FloatingIp * | ReverseFlowFipEntry (const FlowExportInfo *flow) |
| uint32_t | ReverseFlowFip (const FlowExportInfo *info) |
| VmInterfaceKey | ReverseFlowFipVmi (const FlowExportInfo *info) |
| bool | RequestHandler (boost::shared_ptr< FlowExportReq > req) |
| bool | RequestHandlerEntry () |
| void | RequestHandlerExit (bool done) |
| void | AddFlow (FlowExportInfo info) |
| void | DeleteFlow (FlowEntryTree::iterator &it) |
| void | UpdateFlowIterationKey (const FlowEntry *del_flow, FlowEntryTree::iterator &tree_it) |
| void | HandleFlowStatsUpdate (const FlowKey &key, uint32_t bytes, uint32_t packets, uint32_t oflow_bytes) |
| DISALLOW_COPY_AND_ASSIGN (FlowStatsCollector) | |
Static Private Member Functions | |
| static uint64_t | GetCurrentTime () |
Private Attributes | |
| AgentUveBase * | agent_uve_ |
| int | task_id_ |
| boost::uuids::random_generator | rand_gen_ |
| const FlowEntry * | flow_iteration_key_ |
| uint64_t | flow_age_time_intvl_ |
| uint32_t | entries_to_visit_ |
| uint64_t | flow_tcp_syn_age_time_ |
| FlowEntryTree | flow_tree_ |
| FlowExportInfoList | flow_export_info_list_ |
| bool | retry_delete_ |
| Queue | request_queue_ |
| tbb::atomic< bool > | deleted_ |
| FlowAgingTableKey | flow_aging_key_ |
| uint32_t | instance_id_ |
| FlowStatsManager * | flow_stats_manager_ |
| FlowStatsCollectorObject * | parent_ |
| AgeingTask * | ageing_task_ |
| uint32_t | timers_per_scan_ |
| uint64_t | current_time_ |
| uint64_t | ageing_task_starts_ |
| uint32_t | flows_visited_ |
| uint32_t | flows_aged_ |
| uint32_t | flows_evicted_ |
Friends | |
| class | AgentUtXmlFlowThreshold |
| class | AgentUtXmlFlowThresholdValidate |
| class | FlowStatsRecordsReq |
| class | FetchFlowStatsRecord |
| class | FlowStatsManager |
| class | FlowStatsCollectorObject |
Additional Inherited Members | |
Public Attributes inherited from StatsCollector | |
| int | run_counter_ |
Definition at line 60 of file flow_stats_collector.h.
| typedef std::map<const FlowEntry*, FlowExportInfo> FlowStatsCollector::FlowEntryTree |
Definition at line 83 of file flow_stats_collector.h.
| typedef WorkQueue<boost::shared_ptr<FlowExportReq> > FlowStatsCollector::Queue |
Definition at line 84 of file flow_stats_collector.h.
| FlowStatsCollector::FlowStatsCollector | ( | boost::asio::io_context & | io, |
| int | intvl, | ||
| uint32_t | flow_cache_timeout, | ||
| AgentUveBase * | uve, | ||
| uint32_t | instance_id, | ||
| FlowAgingTableKey * | key, | ||
| FlowStatsManager * | aging_module, | ||
| FlowStatsCollectorObject * | obj | ||
| ) |
|
virtual |
| void FlowStatsCollector::AddEvent | ( | const FlowEntryPtr & | flow | ) |
|
private |
| bool FlowStatsCollector::AgeFlow | ( | KSyncFlowMemory * | ksync_obj, |
| const vr_flow_entry * | k_flow, | ||
| const vr_flow_stats & | k_stats, | ||
| const KFlowData & | kinfo, | ||
| FlowExportInfo * | info, | ||
| uint64_t | curr_time | ||
| ) |
|
inline |
Definition at line 153 of file flow_stats_collector.h.
|
inline |
Definition at line 158 of file flow_stats_collector.h.
| void FlowStatsCollector::DeleteEvent | ( | const FlowEntryPtr & | flow, |
| const RevFlowDepParams & | params | ||
| ) |
|
private |
|
private |
|
private |
| bool FlowStatsCollector::EvictFlow | ( | KSyncFlowMemory * | ksync_obj, |
| const vr_flow_entry * | k_flow, | ||
| uint16_t | k_flow_flags, | ||
| uint32_t | flow_handle, | ||
| uint16_t | gen_id, | ||
| FlowExportInfo * | info, | ||
| uint64_t | curr_time | ||
| ) |
| FlowExportInfo * FlowStatsCollector::FindFlowExportInfo | ( | const FlowEntry * | fe | ) |
Definition at line 906 of file flow_stats_collector.cc.
| const FlowExportInfo * FlowStatsCollector::FindFlowExportInfo | ( | const FlowEntry * | fe | ) | const |
Definition at line 916 of file flow_stats_collector.cc.
| bool FlowStatsCollector::FindFlowExportInfo | ( | const FlowEntry * | fe, |
| FlowEntryTree::iterator & | it | ||
| ) |
Definition at line 925 of file flow_stats_collector.cc.
|
inline |
Definition at line 105 of file flow_stats_collector.h.
|
inline |
Definition at line 110 of file flow_stats_collector.h.
|
inline |
Definition at line 161 of file flow_stats_collector.h.
|
inline |
Definition at line 113 of file flow_stats_collector.h.
|
private |
|
private |
|
staticprivate |
|
static |
Definition at line 184 of file flow_stats_collector.cc.
|
private |
|
private |
|
private |
|
inline |
Definition at line 165 of file flow_stats_collector.h.
| void FlowStatsCollector::NewFlow | ( | FlowEntry * | flow | ) |
| uint32_t FlowStatsCollector::ProcessFlow | ( | FlowExportInfoList::iterator & | it, |
| KSyncFlowMemory * | ksync_obj, | ||
| FlowExportInfo * | info, | ||
| uint64_t | curr_time | ||
| ) |
|
inline |
Definition at line 166 of file flow_stats_collector.h.
| boost::uuids::uuid FlowStatsCollector::rand_gen | ( | ) |
Definition at line 90 of file flow_stats_collector.cc.
|
private |
|
private |
|
private |
Definition at line 849 of file flow_stats_collector.cc.
|
private |
|
private |
|
private |
|
virtual |
Implements StatsCollector.
Definition at line 762 of file flow_stats_collector.cc.

| uint32_t FlowStatsCollector::RunAgeing | ( | uint32_t | max_count | ) |
| bool FlowStatsCollector::RunAgeingTask | ( | ) |
|
inline |
Definition at line 155 of file flow_stats_collector.h.
|
inline |
Definition at line 106 of file flow_stats_collector.h.
|
inline |
Definition at line 116 of file flow_stats_collector.h.
|
private |
| void FlowStatsCollector::Shutdown | ( | void | ) |
|
inline |
Definition at line 152 of file flow_stats_collector.h.
|
inline |
Definition at line 164 of file flow_stats_collector.h.
|
private |
Definition at line 106 of file flow_stats_collector.cc.
|
private |
Definition at line 132 of file flow_stats_collector.cc.
| void FlowStatsCollector::UpdateFloatingIpStats | ( | const FlowExportInfo * | flow, |
| uint64_t | bytes, | ||
| uint64_t | pkts | ||
| ) |
|
inline |
Definition at line 132 of file flow_stats_collector.h.
|
inline |
|
private |
Definition at line 1010 of file flow_stats_collector.cc.
|
private |
|
private |
|
private |
|
private |
| void FlowStatsCollector::UpdateStatsEvent | ( | const FlowEntryPtr & | flow, |
| uint32_t | bytes, | ||
| uint32_t | packets, | ||
| uint32_t | oflow_bytes, | ||
| const boost::uuids::uuid & | u | ||
| ) |
|
private |
|
private |
|
friend |
Definition at line 167 of file flow_stats_collector.h.
|
friend |
Definition at line 168 of file flow_stats_collector.h.
|
friend |
Definition at line 170 of file flow_stats_collector.h.
|
friend |
Definition at line 172 of file flow_stats_collector.h.
|
friend |
Definition at line 171 of file flow_stats_collector.h.
|
friend |
Definition at line 169 of file flow_stats_collector.h.
|
private |
Definition at line 252 of file flow_stats_collector.h.
|
private |
Definition at line 260 of file flow_stats_collector.h.
|
private |
Definition at line 225 of file flow_stats_collector.h.
|
private |
Definition at line 259 of file flow_stats_collector.h.
|
private |
Definition at line 247 of file flow_stats_collector.h.
|
private |
Definition at line 231 of file flow_stats_collector.h.
|
private |
Definition at line 229 of file flow_stats_collector.h.
|
private |
Definition at line 248 of file flow_stats_collector.h.
|
private |
Definition at line 235 of file flow_stats_collector.h.
|
private |
Definition at line 228 of file flow_stats_collector.h.
|
private |
Definition at line 250 of file flow_stats_collector.h.
|
private |
Definition at line 232 of file flow_stats_collector.h.
|
private |
Definition at line 234 of file flow_stats_collector.h.
|
static |
Definition at line 63 of file flow_stats_collector.h.
|
private |
Definition at line 264 of file flow_stats_collector.h.
|
private |
Definition at line 265 of file flow_stats_collector.h.
|
private |
Definition at line 263 of file flow_stats_collector.h.
|
static |
Definition at line 65 of file flow_stats_collector.h.
|
private |
Definition at line 249 of file flow_stats_collector.h.
|
static |
Definition at line 80 of file flow_stats_collector.h.
|
static |
Definition at line 78 of file flow_stats_collector.h.
|
static |
Definition at line 69 of file flow_stats_collector.h.
|
static |
Definition at line 75 of file flow_stats_collector.h.
|
static |
Definition at line 71 of file flow_stats_collector.h.
|
static |
Definition at line 81 of file flow_stats_collector.h.
|
static |
Definition at line 73 of file flow_stats_collector.h.
|
private |
Definition at line 251 of file flow_stats_collector.h.
|
private |
Definition at line 227 of file flow_stats_collector.h.
|
private |
Definition at line 246 of file flow_stats_collector.h.
|
private |
Definition at line 245 of file flow_stats_collector.h.
|
private |
Definition at line 226 of file flow_stats_collector.h.
|
private |
Definition at line 255 of file flow_stats_collector.h.