diff options
author | Ole Troan <ot@cisco.com> | 2018-09-04 13:19:12 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-09-17 10:07:27 +0000 |
commit | 58492a83722caf1c49977d73abf931418ce1f8f2 (patch) | |
tree | 0e2f7e031fbfa10c35448c9660292146aeb442b1 /src/vlib/counter.h | |
parent | 40ea3f59dca497e5f4b5a8440a9c8c2e37396701 (diff) |
STATS: Dynamically mapped shared memory segment
Move from using a hash to a vector with offsets into shared memory.
Limit exposure of VPP data structures and include files to
external stats library and applications.
Change-Id: Ic06129f12d10cf4c4946a86d9bc734eacff2c7da
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vlib/counter.h')
-rw-r--r-- | src/vlib/counter.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/vlib/counter.h b/src/vlib/counter.h index fe5279a5e28..3aacc9b375f 100644 --- a/src/vlib/counter.h +++ b/src/vlib/counter.h @@ -40,6 +40,8 @@ #ifndef included_vlib_counter_h #define included_vlib_counter_h +#include <vlib/counter_types.h> + /** \file Optimized thread-safe counters. @@ -50,9 +52,6 @@ The idea is to drastically eliminate atomic operations. */ -/** 64bit counters */ -typedef u64 counter_t; - /** A collection of simple counters */ typedef struct @@ -135,14 +134,6 @@ vlib_zero_simple_counter (vlib_simple_counter_main_t * cm, u32 index) } } -/** Combined counter to hold both packets and byte differences. - */ -typedef struct -{ - counter_t packets; /**< packet counter */ - counter_t bytes; /**< byte counter */ -} vlib_counter_t; - /** Add two combined counters, results in the first counter @param [in,out] a - (vlib_counter_t *) dst counter @param b - (vlib_counter_t *) src counter |