FD.io VPP  v21.01.1
Vector Packet Processing
stat_segment.c File Reference
+ Include dependency graph for stat_segment.c:

Go to the source code of this file.

Functions

void vlib_stat_segment_lock (void)
 
void vlib_stat_segment_unlock (void)
 
void * vlib_stats_push_heap (void *old)
 
static u32 lookup_hash_index (u8 *name)
 
static void create_hash_index (u8 *name, u32 index)
 
static u32 vlib_stats_get_next_vector_index ()
 
static u32 vlib_stats_create_counter (stat_segment_directory_entry_t *e, void *oldheap)
 
static void vlib_stats_delete_counter (u32 index, void *oldheap)
 
void vlib_stats_delete_cm (void *cm_arg)
 
void vlib_stats_pop_heap (void *cm_arg, void *oldheap, u32 cindex, stat_directory_type_t type)
 
void vlib_stats_register_error_index (void *oldheap, u8 *name, u64 *em_vec, u64 index)
 
static void stat_validate_counter_vector (stat_segment_directory_entry_t *ep, u32 max)
 
static void stat_set_simple_counter (stat_segment_directory_entry_t *ep, u32 thread_index, u32 index, u64 value)
 
void vlib_stats_pop_heap2 (u64 *error_vector, u32 thread_index, void *oldheap, int lock)
 
clib_error_tvlib_map_stat_segment_init (void)
 
static int name_sort_cmp (void *a1, void *a2)
 
static u8format_stat_dir_entry (u8 *s, va_list *args)
 
static clib_error_tshow_stat_segment_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static void update_node_counters (stat_segment_main_t *sm)
 
static void do_stat_segment_updates (stat_segment_main_t *sm)
 
static clib_error_tstats_socket_accept_ready (clib_file_t *uf)
 
static clib_error_tstats_segment_socket_init (void)
 
static clib_error_tstats_segment_socket_exit (vlib_main_t *vm)
 
f64 vlib_get_stat_segment_update_rate (void)
 
static uword stat_segment_collector_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 
static clib_error_tstatseg_init (vlib_main_t *vm)
 
clib_error_tstat_segment_register_gauge (u8 *name, stat_segment_update_fn update_fn, u32 caller_index)
 
clib_error_tstat_segment_register_state_counter (u8 *name, u32 *index)
 
clib_error_tstat_segment_deregister_state_counter (u32 index)
 
void stat_segment_set_state_counter (u32 index, u64 value)
 
static clib_error_tstatseg_config (vlib_main_t *vm, unformat_input_t *input)
 
static clib_error_tstatseg_sw_interface_add_del (vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
 
 VNET_SW_INTERFACE_ADD_DEL_FUNCTION (statseg_sw_interface_add_del)
 

Variables

stat_segment_main_t stat_segment_main
 
static vlib_cli_command_t show_stat_segment_command
 (constructor) VLIB_CLI_COMMAND (show_stat_segment_command) More...
 
static vlib_node_registration_t stat_segment_collector
 (constructor) VLIB_REGISTER_NODE (stat_segment_collector) More...
 

Function Documentation

◆ create_hash_index()

static void create_hash_index ( u8 name,
u32  index 
)
static

Definition at line 81 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ do_stat_segment_updates()

static void do_stat_segment_updates ( stat_segment_main_t sm)
static

Definition at line 590 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_stat_dir_entry()

static u8* format_stat_dir_entry ( u8 s,
va_list *  args 
)
static

Definition at line 400 of file stat_segment.c.

+ Here is the caller graph for this function:

◆ lookup_hash_index()

static u32 lookup_hash_index ( u8 name)
static

Definition at line 62 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ name_sort_cmp()

static int name_sort_cmp ( void *  a1,
void *  a2 
)
static

Definition at line 391 of file stat_segment.c.

+ Here is the caller graph for this function:

◆ show_stat_segment_command_fn()

static clib_error_t* show_stat_segment_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 441 of file stat_segment.c.

+ Here is the call graph for this function:

◆ stat_segment_collector_process()

static uword stat_segment_collector_process ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f 
)
static

Definition at line 754 of file stat_segment.c.

+ Here is the call graph for this function:

◆ stat_segment_deregister_state_counter()

clib_error_t* stat_segment_deregister_state_counter ( u32  index)

Definition at line 860 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stat_segment_register_gauge()

clib_error_t* stat_segment_register_gauge ( u8 name,
stat_segment_update_fn  update_fn,
u32  caller_index 
)

Definition at line 787 of file stat_segment.c.

+ Here is the call graph for this function:

◆ stat_segment_register_state_counter()

clib_error_t* stat_segment_register_state_counter ( u8 name,
u32 index 
)

Definition at line 826 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stat_segment_set_state_counter()

void stat_segment_set_state_counter ( u32  index,
u64  value 
)

Definition at line 888 of file stat_segment.c.

+ Here is the caller graph for this function:

◆ stat_set_simple_counter()

static void stat_set_simple_counter ( stat_segment_directory_entry_t ep,
u32  thread_index,
u32  index,
u64  value 
)
inlinestatic

Definition at line 280 of file stat_segment.c.

+ Here is the caller graph for this function:

◆ stat_validate_counter_vector()

static void stat_validate_counter_vector ( stat_segment_directory_entry_t ep,
u32  max 
)
static

Definition at line 265 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stats_segment_socket_exit()

static clib_error_t* stats_segment_socket_exit ( vlib_main_t vm)
static

Definition at line 734 of file stat_segment.c.

◆ stats_segment_socket_init()

static clib_error_t* stats_segment_socket_init ( void  )
static

Definition at line 708 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stats_socket_accept_ready()

static clib_error_t* stats_socket_accept_ready ( clib_file_t uf)
static

Definition at line 685 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ statseg_config()

static clib_error_t* statseg_config ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 897 of file stat_segment.c.

+ Here is the call graph for this function:

◆ statseg_init()

static clib_error_t* statseg_init ( vlib_main_t vm)
static

Definition at line 768 of file stat_segment.c.

+ Here is the call graph for this function:

◆ statseg_sw_interface_add_del()

static clib_error_t* statseg_sw_interface_add_del ( vnet_main_t vnm,
u32  sw_if_index,
u32  is_add 
)
static

Definition at line 939 of file stat_segment.c.

+ Here is the call graph for this function:

◆ update_node_counters()

static void update_node_counters ( stat_segment_main_t sm)
inlinestatic

Definition at line 502 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_get_stat_segment_update_rate()

f64 vlib_get_stat_segment_update_rate ( void  )

Definition at line 748 of file stat_segment.c.

◆ vlib_map_stat_segment_init()

clib_error_t* vlib_map_stat_segment_init ( void  )

Definition at line 314 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_stat_segment_lock()

void vlib_stat_segment_lock ( void  )

Definition at line 32 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_stat_segment_unlock()

void vlib_stat_segment_unlock ( void  )

Definition at line 40 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_stats_create_counter()

static u32 vlib_stats_create_counter ( stat_segment_directory_entry_t e,
void *  oldheap 
)
static

Definition at line 111 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_stats_delete_cm()

void vlib_stats_delete_cm ( void *  cm_arg)

Definition at line 154 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_stats_delete_counter()

static void vlib_stats_delete_counter ( u32  index,
void *  oldheap 
)
static

Definition at line 130 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_stats_get_next_vector_index()

static u32 vlib_stats_get_next_vector_index ( )
static

Definition at line 92 of file stat_segment.c.

+ Here is the caller graph for this function:

◆ vlib_stats_pop_heap()

void vlib_stats_pop_heap ( void *  cm_arg,
void *  oldheap,
u32  cindex,
stat_directory_type_t  type 
)

Definition at line 185 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_stats_pop_heap2()

void vlib_stats_pop_heap2 ( u64 error_vector,
u32  thread_index,
void *  oldheap,
int  lock 
)

Definition at line 290 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_stats_push_heap()

void * vlib_stats_push_heap ( void *  old)

Definition at line 52 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_stats_register_error_index()

void vlib_stats_register_error_index ( void *  oldheap,
u8 name,
u64 em_vec,
u64  index 
)

Definition at line 234 of file stat_segment.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VNET_SW_INTERFACE_ADD_DEL_FUNCTION()

VNET_SW_INTERFACE_ADD_DEL_FUNCTION ( statseg_sw_interface_add_del  )
+ Here is the caller graph for this function:

Variable Documentation

◆ show_stat_segment_command

vlib_cli_command_t show_stat_segment_command
static
Initial value:
=
{
.path = "show statistics segment",
.short_help = "show statistics segment [verbose]",
}
static clib_error_t * show_stat_segment_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: stat_segment.c:441

(constructor) VLIB_CLI_COMMAND (show_stat_segment_command)

Definition at line 485 of file stat_segment.c.

◆ stat_segment_collector

vlib_node_registration_t stat_segment_collector
static
Initial value:
=
{
.name = "statseg-collector-process",
}
static uword stat_segment_collector_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: stat_segment.c:754

(constructor) VLIB_REGISTER_NODE (stat_segment_collector)

Definition at line 983 of file stat_segment.c.

◆ stat_segment_main

stat_segment_main_t stat_segment_main

Definition at line 26 of file stat_segment.c.