5 #ifndef __OF1X_STATISTICS_PP_H__
6 #define __OF1X_STATISTICS_PP_H__
10 #include "../../../util/pp_guard.h"
15 #include "../../../platform/lock.h"
16 #include "../../../platform/likely.h"
17 #include "../../../platform/memory.h"
18 #include "../../../platform/packet.h"
19 #include "../../../platform/atomic_operations.h"
20 #include "../of1x_async_events_hooks.h"
31 static inline void __of1x_stats_flow_update_match(
unsigned int tid,
of1x_stats_flow_t* stats, uint64_t bytes_rx){
35 assert(tid < ROFL_PIPELINE_MAX_TIDS);
37 if(unlikely(tid == ROFL_PIPELINE_LOCKED_TID)){
42 s->byte_count+=bytes_rx;
47 static inline void __of1x_stats_table_update_match(
unsigned int tid,
of1x_stats_table_t* stats){
51 assert(tid < ROFL_PIPELINE_MAX_TIDS);
53 if(unlikely(tid == ROFL_PIPELINE_LOCKED_TID)){
62 static inline void __of1x_stats_table_update_no_match(
unsigned int tid,
of1x_stats_table_t* stats){
64 assert(tid < ROFL_PIPELINE_MAX_TIDS);
66 if(unlikely(tid == ROFL_PIPELINE_LOCKED_TID)){
69 stats->s.__internal[tid].lookup_count++;
74 static void __of1x_stats_group_update(
unsigned int tid,
of1x_stats_group_t *gr_stats, uint64_t bytes){
78 assert(tid < ROFL_PIPELINE_MAX_TIDS);
80 if(unlikely(tid == ROFL_PIPELINE_LOCKED_TID)){
85 s->byte_count += bytes;
91 static void __of1x_stats_bucket_update(
unsigned int tid,
__of1x_stats_bucket_t* bc_stats, uint64_t bytes){
95 assert(tid < ROFL_PIPELINE_MAX_TIDS);
97 if(unlikely(tid == ROFL_PIPELINE_LOCKED_TID)){
102 s->byte_count += bytes;
106 #endif //OF1X_STATISTICS_PP_H
OpenFlow v1.0, 1.2 and 1.3.2 statistics subsystem.