FD.io VPP  v17.04.2-2-ga8f93f8
Vector Packet Processing
stats.c File Reference
+ Include dependency graph for stats.c:

Go to the source code of this file.

Data Structures

struct  ip4_nbr_stats_ctx_t_
 The context passed when collecting adjacency counters. More...
 
struct  ip6_nbr_stats_ctx_t_
 The context passed when collecting adjacency counters. More...
 
struct  ip6_route_t
 
struct  add_routes_in_fib_arg_t
 

Macros

#define STATS_DEBUG   0
 
#define f64_endian(a)
 
#define f64_print(a, b)
 
#define vl_typedefs   /* define message structures */
 
#define vl_endianfun   /* define message structures */
 
#define vl_print(handle, ...)   vlib_cli_output (handle, __VA_ARGS__)
 
#define vl_printfun
 
#define foreach_stats_msg
 
#define SIMPLE_COUNTER_BATCH_SIZE   126
 
#define COMBINED_COUNTER_BATCH_SIZE   63
 
#define IP4_FIB_COUNTER_BATCH_SIZE   48
 
#define IP6_FIB_COUNTER_BATCH_SIZE   30
 
#define STATS_RELEASE_DELAY_NS   (1000 * 1000 * 5)
 
#define MIN(x, y)   (((x)<(y))?(x):(y))
 
#define MIN(x, y)   (((x)<(y))?(x):(y))
 
#define vl_api_vnet_ip4_fib_counters_t_endian   vl_noop_handler
 
#define vl_api_vnet_ip4_fib_counters_t_print   vl_noop_handler
 
#define vl_api_vnet_ip6_fib_counters_t_endian   vl_noop_handler
 
#define vl_api_vnet_ip6_fib_counters_t_print   vl_noop_handler
 
#define vl_api_vnet_ip4_nbr_counters_t_endian   vl_noop_handler
 
#define vl_api_vnet_ip4_nbr_counters_t_print   vl_noop_handler
 
#define vl_api_vnet_ip6_nbr_counters_t_endian   vl_noop_handler
 
#define vl_api_vnet_ip6_nbr_counters_t_print   vl_noop_handler
 

Typedefs

typedef struct ip4_nbr_stats_ctx_t_ ip4_nbr_stats_ctx_t
 The context passed when collecting adjacency counters. More...
 
typedef struct ip6_nbr_stats_ctx_t_ ip6_nbr_stats_ctx_t
 The context passed when collecting adjacency counters. More...
 

Functions

void dslock (stats_main_t *sm, int release_hint, int tag)
 
void stats_dslock_with_hint (int hint, int tag)
 
void dsunlock (stats_main_t *sm)
 
void stats_dsunlock (int hint, int tag)
 
static void do_simple_interface_counters (stats_main_t *sm)
 
static void do_combined_interface_counters (stats_main_t *sm)
 
typedef CLIB_PACKED (struct{ip4_address_t address;u32 address_length:6;u32 index:26;})
 
static adj_walk_rc_t ip4_nbr_stats_cb (adj_index_t ai, void *arg)
 
static void ip4_nbr_ship (stats_main_t *sm, ip4_nbr_stats_ctx_t *ctx)
 
static void do_ip4_nbrs (stats_main_t *sm)
 
static adj_walk_rc_t ip6_nbr_stats_cb (adj_index_t ai, void *arg)
 
static void ip6_nbr_ship (stats_main_t *sm, ip6_nbr_stats_ctx_t *ctx)
 
static void do_ip6_nbrs (stats_main_t *sm)
 
static void do_ip4_fibs (stats_main_t *sm)
 
static void add_routes_in_fib (BVT(clib_bihash_kv)*kvp, void *arg)
 
static void do_ip6_fibs (stats_main_t *sm)
 
static void stats_thread_fn (void *arg)
 
static void vl_api_vnet_interface_counters_t_handler (vl_api_vnet_interface_counters_t *mp)
 
static void vl_api_vnet_ip4_fib_counters_t_handler (vl_api_vnet_ip4_fib_counters_t *mp)
 
static void vl_api_vnet_ip4_nbr_counters_t_handler (vl_api_vnet_ip4_nbr_counters_t *mp)
 
static void vl_api_vnet_ip6_fib_counters_t_handler (vl_api_vnet_ip6_fib_counters_t *mp)
 
static void vl_api_vnet_ip6_nbr_counters_t_handler (vl_api_vnet_ip6_nbr_counters_t *mp)
 
static void vl_api_want_stats_t_handler (vl_api_want_stats_t *mp)
 
int stats_memclnt_delete_callback (u32 client_index)
 
static clib_error_tstats_init (vlib_main_t *vm)
 
 VLIB_REGISTER_THREAD (stats_thread_reg, static)
 

Variables

stats_main_t stats_main
 

Macro Definition Documentation

#define COMBINED_COUNTER_BATCH_SIZE   63

Definition at line 57 of file stats.c.

#define f64_endian (   a)

Definition at line 30 of file stats.c.

#define f64_print (   a,
 
)

Definition at line 31 of file stats.c.

#define foreach_stats_msg
Value:
_(WANT_STATS, want_stats) \
_(VNET_INTERFACE_COUNTERS, vnet_interface_counters) \
_(VNET_IP4_FIB_COUNTERS, vnet_ip4_fib_counters) \
_(VNET_IP6_FIB_COUNTERS, vnet_ip6_fib_counters) \
_(VNET_IP4_NBR_COUNTERS, vnet_ip4_nbr_counters) \
_(VNET_IP6_NBR_COUNTERS, vnet_ip6_nbr_counters)

Definition at line 47 of file stats.c.

#define IP4_FIB_COUNTER_BATCH_SIZE   48

Definition at line 58 of file stats.c.

#define IP6_FIB_COUNTER_BATCH_SIZE   30

Definition at line 59 of file stats.c.

#define MIN (   x,
  y 
)    (((x)<(y))?(x):(y))

Definition at line 456 of file stats.c.

#define MIN (   x,
  y 
)    (((x)<(y))?(x):(y))

Definition at line 456 of file stats.c.

#define SIMPLE_COUNTER_BATCH_SIZE   126

Definition at line 56 of file stats.c.

#define STATS_DEBUG   0

Definition at line 22 of file stats.c.

#define STATS_RELEASE_DELAY_NS   (1000 * 1000 * 5)

Definition at line 62 of file stats.c.

#define vl_api_vnet_ip4_fib_counters_t_endian   vl_noop_handler

Definition at line 1304 of file stats.c.

#define vl_api_vnet_ip4_fib_counters_t_print   vl_noop_handler

Definition at line 1305 of file stats.c.

#define vl_api_vnet_ip4_nbr_counters_t_endian   vl_noop_handler

Definition at line 1308 of file stats.c.

#define vl_api_vnet_ip4_nbr_counters_t_print   vl_noop_handler

Definition at line 1309 of file stats.c.

#define vl_api_vnet_ip6_fib_counters_t_endian   vl_noop_handler

Definition at line 1306 of file stats.c.

#define vl_api_vnet_ip6_fib_counters_t_print   vl_noop_handler

Definition at line 1307 of file stats.c.

#define vl_api_vnet_ip6_nbr_counters_t_endian   vl_noop_handler

Definition at line 1310 of file stats.c.

#define vl_api_vnet_ip6_nbr_counters_t_print   vl_noop_handler

Definition at line 1311 of file stats.c.

#define vl_endianfun   /* define message structures */

Definition at line 37 of file stats.c.

#define vl_print (   handle,
  ... 
)    vlib_cli_output (handle, __VA_ARGS__)

Definition at line 42 of file stats.c.

#define vl_printfun

Definition at line 43 of file stats.c.

#define vl_typedefs   /* define message structures */

Definition at line 33 of file stats.c.

Typedef Documentation

The context passed when collecting adjacency counters.

The context passed when collecting adjacency counters.

Function Documentation

static void add_routes_in_fib ( BVT(clib_bihash_kv)*  kvp,
void *  arg 
)
static

Definition at line 741 of file stats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

typedef CLIB_PACKED ( struct{ip4_address_t address;u32 address_length:6;u32 index:26;}  )

Definition at line 235 of file stats.c.

static void do_combined_interface_counters ( stats_main_t sm)
static

Definition at line 182 of file stats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void do_ip4_fibs ( stats_main_t sm)
static

Definition at line 570 of file stats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void do_ip4_nbrs ( stats_main_t sm)
static

Definition at line 363 of file stats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void do_ip6_fibs ( stats_main_t sm)
static

Definition at line 762 of file stats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void do_ip6_nbrs ( stats_main_t sm)
static

Definition at line 518 of file stats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void do_simple_interface_counters ( stats_main_t sm)
static

Definition at line 127 of file stats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void dslock ( stats_main_t sm,
int  release_hint,
int  tag 
)

Definition at line 66 of file stats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void dsunlock ( stats_main_t sm)

Definition at line 99 of file stats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ip4_nbr_ship ( stats_main_t sm,
ip4_nbr_stats_ctx_t ctx 
)
static

Definition at line 305 of file stats.c.

+ Here is the call graph for this function:

static adj_walk_rc_t ip4_nbr_stats_cb ( adj_index_t  ai,
void *  arg 
)
static

Definition at line 279 of file stats.c.

+ Here is the call graph for this function:

static void ip6_nbr_ship ( stats_main_t sm,
ip6_nbr_stats_ctx_t ctx 
)
static

Definition at line 459 of file stats.c.

+ Here is the call graph for this function:

static adj_walk_rc_t ip6_nbr_stats_cb ( adj_index_t  ai,
void *  arg 
)
static

Definition at line 431 of file stats.c.

+ Here is the call graph for this function:

void stats_dslock_with_hint ( int  hint,
int  tag 
)

Definition at line 92 of file stats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stats_dsunlock ( int  hint,
int  tag 
)

Definition at line 120 of file stats.c.

+ Here is the call graph for this function:

static clib_error_t* stats_init ( vlib_main_t vm)
static

Definition at line 1314 of file stats.c.

+ Here is the call graph for this function:

int stats_memclnt_delete_callback ( u32  client_index)

Definition at line 1287 of file stats.c.

+ Here is the caller graph for this function:

static void stats_thread_fn ( void *  arg)
static

Definition at line 906 of file stats.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vl_api_vnet_interface_counters_t_handler ( vl_api_vnet_interface_counters_t mp)
static

Definition at line 942 of file stats.c.

static void vl_api_vnet_ip4_fib_counters_t_handler ( vl_api_vnet_ip4_fib_counters_t mp)
static

Definition at line 1073 of file stats.c.

static void vl_api_vnet_ip4_nbr_counters_t_handler ( vl_api_vnet_ip4_nbr_counters_t mp)
static

Definition at line 1112 of file stats.c.

static void vl_api_vnet_ip6_fib_counters_t_handler ( vl_api_vnet_ip6_fib_counters_t mp)
static

Definition at line 1151 of file stats.c.

static void vl_api_vnet_ip6_nbr_counters_t_handler ( vl_api_vnet_ip6_nbr_counters_t mp)
static

Definition at line 1190 of file stats.c.

static void vl_api_want_stats_t_handler ( vl_api_want_stats_t mp)
static

Definition at line 1229 of file stats.c.

+ Here is the call graph for this function:

VLIB_REGISTER_THREAD ( stats_thread_reg  ,
static   
)

+ Here is the caller graph for this function:

Variable Documentation

stats_main_t stats_main

Definition at line 24 of file stats.c.