summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-gpe/lisp_gpe.h
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2017-03-09 16:48:39 +0100
committerFlorin Coras <florin.coras@gmail.com>2017-03-21 15:31:56 +0000
commit4868ff65eddfd694a1485d6c6c355f9a8ca9011d (patch)
tree37a32136a23428e0fddcf50dd244c11ba67378f2 /src/vnet/lisp-gpe/lisp_gpe.h
parent1dc2f9284e5b5eb8b300d63cdb8f74ee36cdecb0 (diff)
LISP statistics
Change-Id: I399cac46d279e020ba33459ef759d9d29d3ac716 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.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/vnet/lisp-gpe/lisp_gpe.h b/src/vnet/lisp-gpe/lisp_gpe.h
index b5a50ec6884..be447024cb9 100644
--- a/src/vnet/lisp-gpe/lisp_gpe.h
+++ b/src/vnet/lisp-gpe/lisp_gpe.h
@@ -90,6 +90,28 @@ typedef struct tunnel_lookup
uword *vni_by_sw_if_index;
} tunnel_lookup_t;
+typedef struct
+{
+ u32 fwd_entry_index;
+ u32 tunnel_index;
+} lisp_stats_key_t;
+
+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;
+} lisp_api_stats_t;
typedef enum gpe_encap_mode_e
{
@@ -143,6 +165,9 @@ typedef struct lisp_gpe_main
gpe_encap_mode_t encap_mode;
+ lisp_stats_t *lisp_stats_pool;
+ uword *lisp_stats_index_by_key;
+
/** convenience */
vlib_main_t *vlib_main;
vnet_main_t *vnet_main;
@@ -283,6 +308,11 @@ lisp_api_gpe_fwd_entry_t *vnet_lisp_gpe_fwd_entries_get_by_vni (u32 vni);
gpe_encap_mode_t vnet_gpe_get_encap_mode (void);
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);
+
#endif /* included_vnet_lisp_gpe_h */
/*