diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2017-04-10 07:54:31 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-04-11 06:30:06 +0000 |
commit | 5e189f1a8862f5a8f837dc612c15d63d2b9b6457 (patch) | |
tree | 6273347a54f84cb5645124d4a120f116e293fcf6 /src/vnet/lisp-gpe/lisp_gpe.h | |
parent | 92bcecfdcc8b44877349fe952339a8bb24be6dfc (diff) |
LSIP: make LISP statistics collecting thread safe, VPP-692
Change-Id: If884835c0f63de162ecf75fecd2a63a1240ee910
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/vnet/lisp-gpe/lisp_gpe.h')
-rw-r--r-- | src/vnet/lisp-gpe/lisp_gpe.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/vnet/lisp-gpe/lisp_gpe.h b/src/vnet/lisp-gpe/lisp_gpe.h index b3821ac8cca..b445dcfc79f 100644 --- a/src/vnet/lisp-gpe/lisp_gpe.h +++ b/src/vnet/lisp-gpe/lisp_gpe.h @@ -98,19 +98,13 @@ typedef struct typedef struct { - u32 pkt_count; - u32 bytes; -} lisp_stats_t; - -typedef struct -{ u32 vni; dp_address_t deid; dp_address_t seid; ip_address_t loc_rloc; ip_address_t rmt_rloc; - lisp_stats_t stats; + vlib_counter_t counters; } lisp_api_stats_t; typedef enum gpe_encap_mode_e @@ -165,8 +159,9 @@ typedef struct lisp_gpe_main gpe_encap_mode_t encap_mode; - lisp_stats_t *lisp_stats_pool; + lisp_stats_key_t *stats_key_pool; uword *lisp_stats_index_by_key; + vlib_combined_counter_main_t counters; /** convenience */ vlib_main_t *vlib_main; @@ -313,7 +308,7 @@ int vnet_gpe_set_encap_mode (gpe_encap_mode_t mode); u8 vnet_lisp_stats_enable_disable_state (void); vnet_api_error_t vnet_lisp_stats_enable_disable (u8 enable); lisp_api_stats_t *vnet_lisp_get_stats (void); -void vnet_lisp_flush_stats (void); +int vnet_lisp_flush_stats (void); #endif /* included_vnet_lisp_gpe_h */ |