30 #define f64_print(a,b) 41 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__) 46 #define foreach_stats_msg \ 47 _(WANT_STATS, want_stats) \ 48 _(VNET_INTERFACE_SIMPLE_COUNTERS, vnet_interface_simple_counters) \ 49 _(WANT_INTERFACE_SIMPLE_STATS, want_interface_simple_stats) \ 50 _(VNET_INTERFACE_COMBINED_COUNTERS, vnet_interface_combined_counters) \ 51 _(WANT_INTERFACE_COMBINED_STATS, want_interface_combined_stats) \ 52 _(WANT_PER_INTERFACE_COMBINED_STATS, want_per_interface_combined_stats) \ 53 _(WANT_PER_INTERFACE_SIMPLE_STATS, want_per_interface_simple_stats) \ 54 _(VNET_IP4_FIB_COUNTERS, vnet_ip4_fib_counters) \ 55 _(WANT_IP4_FIB_STATS, want_ip4_fib_stats) \ 56 _(VNET_IP6_FIB_COUNTERS, vnet_ip6_fib_counters) \ 57 _(WANT_IP6_FIB_STATS, want_ip6_fib_stats) \ 58 _(VNET_IP4_NBR_COUNTERS, vnet_ip4_nbr_counters) \ 59 _(WANT_IP4_NBR_STATS, want_ip4_nbr_stats) \ 60 _(VNET_IP6_NBR_COUNTERS, vnet_ip6_nbr_counters) \ 61 _(WANT_IP6_NBR_STATS, want_ip6_nbr_stats) \ 62 _(VNET_GET_SUMMARY_STATS, vnet_get_summary_stats) 65 #define vl_msg_name_crc_list 66 #include <vpp/stats/stats.api.h> 67 #undef vl_msg_name_crc_list 73 vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); 74 foreach_vl_msg_name_crc_stats;
79 #define SIMPLE_COUNTER_BATCH_SIZE 126 80 #define COMBINED_COUNTER_BATCH_SIZE 63 81 #define IP4_FIB_COUNTER_BATCH_SIZE 48 82 #define IP6_FIB_COUNTER_BATCH_SIZE 30 85 #define STATS_RELEASE_DELAY_NS (1000 * 1000 * 5) 98 count = ntohl (mp->
count);
114 counter_name =
"bogus";
117 for (i = 0; i <
count; i++)
120 packets = clib_net_to_host_u64 (packets);
122 bytes = clib_net_to_host_u64 (bytes);
124 s =
format (s,
"%U.%s.packets %lld\n",
126 sm->
vnet_main, sw_if_index, counter_name, packets);
127 s =
format (s,
"%U.%s.bytes %lld\n",
129 sm->
vnet_main, sw_if_index, counter_name, bytes);
143 count = ntohl (mp->
count);
152 counter_name =
"drop";
155 counter_name =
"punt";
158 counter_name =
"ip4";
161 counter_name =
"ip6";
164 counter_name =
"rx-no-buff";
167 counter_name =
"rx-miss";
170 counter_name =
"rx-error (fifo-full)";
173 counter_name =
"tx-error (fifo-full)";
176 counter_name =
"bogus";
182 v = clib_net_to_host_u64 (v);
185 sm->
vnet_main, sw_if_index, counter_name, v);
211 while (__sync_lock_test_and_set (&l->
lock, 1))
291 registration->
item = item;
378 vec_add1 (clients, *client);}
390 #define stats_reg(n) vec_free(registrations[IDX_##n]); 391 #include <vpp/stats/stats.reg> 411 #define stats_reg(n) \ 412 vec_reset_length(registrations[IDX_##n]); 413 #include <vpp/stats/stats.reg> 420 return registrations;
432 #define stats_reg(n) \ 433 vec_add1(registrations[IDX_##n], ~0); 434 #include <vpp/stats/stats.reg> 436 return registrations;
448 u32 items_this_message = 0;
461 for (i = 0; i < n_counts; i++)
469 (
sizeof (*mp) + items_this_message *
sizeof (v));
470 mp->_vl_msg_id = ntohs (VL_API_VNET_INTERFACE_SIMPLE_COUNTERS);
480 if (mp->
count == items_this_message)
482 mp->
count = htonl (items_this_message);
495 u32 item,
int enable_disable)
503 if (enable_disable == 0)
539 vl_api_want_interface_combined_stats_reply_t *rmp;
564 rmp->_vl_msg_id = ntohs (VL_API_WANT_INTERFACE_COMBINED_STATS_REPLY);
566 rmp->retval = retval;
588 for (i = 0; i <
vec_len (clients); i++)
594 if (q_prev && (q_prev->cursize < q_prev->maxsize))
605 fformat (stdout,
"%U\n", format_vnet_combined_counters, mp);
608 if (q_prev && (q_prev->cursize < q_prev->maxsize))
627 u32 items_this_message = 0;
636 for (i = 0; i < n_counts; i++)
644 (
sizeof (*mp) + items_this_message *
sizeof (v));
645 mp->_vl_msg_id = ntohs (VL_API_VNET_INTERFACE_COMBINED_COUNTERS);
653 = clib_host_to_net_u64 (v.
packets);
657 if (mp->
count == items_this_message)
659 mp->
count = htonl (items_this_message);
681 vl_api_want_per_interface_combined_stats_reply_t *rmp;
690 for (i = 0; i < mp->
num; i++)
699 retval = VNET_API_ERROR_INVALID_SW_IF_INDEX;
705 for (i = 0; i < mp->
num; i++)
720 for (i = 0; i < mp->
num; i++)
731 rmp->_vl_msg_id = ntohs (VL_API_WANT_PER_INTERFACE_COMBINED_STATS_REPLY);
733 rmp->retval = retval;
758 u32 items_this_message = 1;
765 u32 *sw_if_index = 0;
792 vec_add1 (sm->regs_tmp, reg);}));
807 vec_add1 (sm->clients_tmp,
828 (items_this_message *
834 ntohs (VL_API_VNET_PER_INTERFACE_COMBINED_COUNTERS);
836 mp->
count = items_this_message;
845 = clib_host_to_net_u64 (v.
packets);
847 clib_host_to_net_u64 (v.
bytes);
854 = clib_host_to_net_u64 (v.
packets);
856 clib_host_to_net_u64 (v.
bytes);
876 vl_api_want_per_interface_simple_stats_reply_t *rmp;
884 for (i = 0; i < mp->
num; i++)
893 retval = VNET_API_ERROR_INVALID_SW_IF_INDEX;
899 for (i = 0; i < mp->
num; i++)
915 for (i = 0; i < mp->
num; i++)
928 rmp->_vl_msg_id = ntohs (VL_API_WANT_PER_INTERFACE_SIMPLE_STATS_REPLY);
930 rmp->retval = retval;
955 u32 items_this_message = 1;
1005 vec_add1 (sm->clients_tmp,
1025 size = (
sizeof (*mp) + (items_this_message * (
sizeof (
u64) * 10)));
1029 mp->_vl_msg_id = ntohs (VL_API_VNET_PER_INTERFACE_SIMPLE_COUNTERS);
1031 mp->
count = items_this_message;
1062 clib_host_to_net_u64 (v);
1098 struct timespec _req, *req = &_req;
1099 struct timespec _rem, *rem = &_rem;
1102 req->tv_nsec = nsec;
1105 if (nanosleep (req, rem) == 0)
1147 vl_counter->
packets = clib_host_to_net_u64 (adj_counter.
packets);
1148 vl_counter->
bytes = clib_host_to_net_u64 (adj_counter.
bytes);
1155 #define MIN(x,y) (((x)<(y))?(x):(y)) 1182 mp->_vl_msg_id = ntohs (VL_API_VNET_IP4_NBR_COUNTERS);
1183 mp->
count = ntohl (n_items);
1195 n_items * sizeof (*ctx->
counters));
1233 ctx.sw_if_index = si->sw_if_index;
1239 ASSERT(ctx.counters == NULL);
1248 dslock (sm, 0 , 1 );
1249 adj_nbr_walk (si->sw_if_index,
1259 if (NULL != ctx.counters)
1261 ip4_nbr_ship(sm, &ctx);
1301 vl_counter->
bytes = clib_host_to_net_u64(adj_counter.
bytes);
1309 #define MIN(x,y) (((x)<(y))?(x):(y)) 1337 mp->_vl_msg_id = ntohs (VL_API_VNET_IP6_NBR_COUNTERS);
1338 mp->
count = ntohl (n_items);
1350 n_items * sizeof (*ctx->
counters));
1388 ctx.sw_if_index = si->sw_if_index;
1394 ASSERT(ctx.counters == NULL);
1403 dslock (sm, 0 , 1 );
1404 adj_nbr_walk (si->sw_if_index,
1414 if (NULL != ctx.counters)
1416 ip6_nbr_ship(sm, &ctx);
1434 u32 items_this_message;
1436 u32 start_at_fib_index = 0;
1445 ({vec_add1(do_fibs->fibs,fib);}));
1451 fib = do_fibs->
fibs[j];
1453 while ((fib - im4->
fibs) < start_at_fib_index)
1464 mp->_vl_msg_id = ntohs (VL_API_VNET_IP4_FIB_COUNTERS);
1489 x.address_length =
i;
1497 p = do_fibs->
pvec[k];
1498 x.address.data_u32 = p->
key;
1499 x.index = p->
value[0];
1504 start_at_fib_index = fib - im4->
fibs;
1534 ctrp->
address = r->address.as_u32;
1537 ctrp->
bytes = clib_host_to_net_u64 (c.
bytes);
1541 if (mp->
count == items_this_message)
1543 mp->
count = htonl (items_this_message);
1567 mp->_vl_msg_id = ntohs (VL_API_VNET_IP4_FIB_COUNTERS);
1575 start_at_fib_index = fib - im4->
fibs;
1624 r->
index = kvp->value;
1639 u32 items_this_message;
1641 u32 start_at_fib_index = 0;
1651 ({vec_add1(do_fibs->fibs,fib);}));
1657 fib = do_fibs->
fibs[
i];
1659 while ((fib - im6->
fibs) < start_at_fib_index)
1668 mp->_vl_msg_id = ntohs (VL_API_VNET_IP6_FIB_COUNTERS);
1685 start_at_fib_index = fib - im6->
fibs;
1715 ctrp->
bytes = clib_host_to_net_u64 (c.
bytes);
1719 if (mp->
count == items_this_message)
1721 mp->
count = htonl (items_this_message);
1745 mp->_vl_msg_id = ntohs (VL_API_VNET_IP6_FIB_COUNTERS);
1754 start_at_fib_index = fib - im6->
fibs;
1790 pthread_sigmask (SIG_SETMASK, &s, 0);
1841 mp_size =
sizeof (*mp) + (ntohl (mp->
count) *
sizeof (
u64));
1847 for (i = 0; i <
vec_len (clients); i++)
1849 client = clients[
i];
1853 if (q_prev && (q_prev->cursize < q_prev->maxsize))
1872 fformat (stdout,
"%U\n", format_vnet_simple_counters, mp);
1875 if (q_prev && (q_prev->cursize < q_prev->maxsize))
1899 mp_size =
sizeof (*mp_copy) +
1905 for (i = 0; i <
vec_len (clients); i++)
1907 client = clients[
i];
1911 if (q_prev && (q_prev->cursize < q_prev->maxsize))
1928 if (q_prev && (q_prev->cursize < q_prev->maxsize))
1948 mp_size =
sizeof (*mp_copy) +
1954 for (i = 0; i <
vec_len (clients); i++)
1956 client = clients[
i];
1960 if (q_prev && (q_prev->cursize < q_prev->maxsize))
1978 if (q_prev && (q_prev->cursize < q_prev->maxsize))
1998 mp_size =
sizeof (*mp_copy) +
2004 for (i = 0; i <
vec_len (clients); i++)
2006 client = clients[
i];
2010 if (q_prev && (q_prev->cursize < q_prev->maxsize))
2027 if (q_prev && (q_prev->cursize < q_prev->maxsize))
2047 mp_size =
sizeof (*mp_copy) +
2053 for (i = 0; i <
vec_len (clients); i++)
2055 client = clients[
i];
2059 if (q_prev && (q_prev->cursize < q_prev->maxsize))
2076 if (q_prev && (q_prev->cursize < q_prev->maxsize))
2091 vl_api_want_stats_reply_t *rmp;
2126 rmp->_vl_msg_id = ntohs (VL_API_WANT_STATS_REPLY);
2128 rmp->retval = retval;
2139 vl_api_want_interface_simple_stats_reply_t *rmp;
2164 rmp->_vl_msg_id = ntohs (VL_API_WANT_INTERFACE_SIMPLE_STATS_REPLY);
2166 rmp->retval = retval;
2177 vl_api_want_ip4_fib_stats_reply_t *rmp;
2201 rmp->_vl_msg_id = ntohs (VL_API_WANT_IP4_FIB_STATS_REPLY);
2203 rmp->retval = retval;
2213 vl_api_want_ip4_fib_stats_reply_t *rmp;
2237 rmp->_vl_msg_id = ntohs (VL_API_WANT_IP6_FIB_STATS_REPLY);
2239 rmp->retval = retval;
2276 rmp->_vl_msg_id = ntohs (VL_API_VNET_GET_SUMMARY_STATS_REPLY);
2280 memset (total_pkts, 0,
sizeof (total_pkts));
2281 memset (total_bytes, 0,
sizeof (total_bytes));
2292 total_pkts[which] += v.
packets;
2293 total_bytes[which] += v.
bytes;
2327 #define vl_api_vnet_interface_simple_counters_t_endian vl_noop_handler 2328 #define vl_api_vnet_interface_simple_counters_t_print vl_noop_handler 2329 #define vl_api_vnet_interface_combined_counters_t_endian vl_noop_handler 2330 #define vl_api_vnet_interface_combined_counters_t_print vl_noop_handler 2331 #define vl_api_vnet_ip4_fib_counters_t_endian vl_noop_handler 2332 #define vl_api_vnet_ip4_fib_counters_t_print vl_noop_handler 2333 #define vl_api_vnet_ip6_fib_counters_t_endian vl_noop_handler 2334 #define vl_api_vnet_ip6_fib_counters_t_print vl_noop_handler 2335 #define vl_api_vnet_ip4_nbr_counters_t_endian vl_noop_handler 2336 #define vl_api_vnet_ip4_nbr_counters_t_print vl_noop_handler 2337 #define vl_api_vnet_ip6_nbr_counters_t_endian vl_noop_handler 2338 #define vl_api_vnet_ip6_nbr_counters_t_print vl_noop_handler 2358 vl_msg_api_set_handlers(VL_API_##N, #n, \ 2359 vl_api_##n##_t_handler, \ 2361 vl_api_##n##_t_endian, \ 2362 vl_api_##n##_t_print, \ 2363 sizeof(vl_api_##n##_t), 0 ); 2382 #define stats_reg(n) \ 2383 sm->stats_registrations[IDX_##n] = 0; \ 2384 sm->stats_registration_hash[IDX_##n] = 0; 2385 #include <vpp/stats/stats.reg> 2399 .no_data_structure_clone = 1,
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
static void vl_api_vnet_get_summary_stats_t_handler(vl_api_vnet_get_summary_stats_t *mp)
Want Interface Simple Stats, register for detailed interface stats.
static void stats_thread_fn(void *arg)
void * vl_msg_api_alloc_as_if_client(int nbytes)
static int set_client_for_stat(u32 reg, u32 item, vpe_client_registration_t *client)
vpe_client_registration_t ** clients_tmp
Want Stats, enable/disable ALL stats updates.
vlib_combined_counter_main_t lbm_to_counters
#define hash_set(h, key, value)
u32 vlib_simple_counter_n_counters(const vlib_simple_counter_main_t *cm)
The number of counters (not the number of per-thread counters)
do_ip46_fibs_t do_ip46_fibs
sll srl srl sll sra u16x4 i
vl_api_vlib_counter_t data[count]
vl_api_vnet_combined_counter_t data[count]
vpe_client_registration_t * clients
#define hash_unset(h, key)
int unix_shared_memory_queue_is_full(unix_shared_memory_queue_t *q)
vl_api_vnet_simple_counter_t data[count]
static adj_walk_rc_t ip6_nbr_stats_cb(adj_index_t ai, void *arg)
vnet_main_t * vnet_get_main(void)
static void vl_api_want_interface_simple_stats_t_handler(vl_api_want_interface_simple_stats_t *mp)
vnet_interface_main_t interface_main
static void vl_api_vnet_interface_simple_counters_t_handler(vl_api_vnet_interface_simple_counters_t *mp)
unix_shared_memory_queue_t * vl_input_queue
Request for a single block of summary stats.
static f64 vlib_time_now(vlib_main_t *vm)
const dpo_id_t * fib_entry_contribute_ip_forwarding(fib_node_index_t fib_entry_index)
u8 * message_bounce
Don't automatically free message buffer vetor.
u32 sw_if_index
The SW IF index all these adjs belong to.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Combined counter to hold both packets and byte differences.
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
vl_api_ip4_nbr_counter_t c[count]
VLIB_REGISTER_THREAD(stats_thread_reg, static)
void clib_longjmp(clib_longjmp_t *save, uword return_value)
static void ip46_fib_stats_delay(stats_main_t *sm, u32 sec, u32 nsec)
void handle_client_registration(vpe_client_registration_t *client, u32 stat, u32 item, int enable_disable)
Combined stats counters structure.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
uword clib_setjmp(clib_longjmp_t *save, uword return_value_not_taken)
static void vl_api_vnet_ip4_fib_counters_t_handler(vl_api_vnet_ip4_fib_counters_t *mp)
static clib_error_t * stats_init(vlib_main_t *vm)
format_function_t format_vnet_sw_if_index_name
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
vnet_link_t ia_link
link/ether-type 1 bytes
static void do_ip6_nbr_counters(stats_main_t *sm)
static void vl_api_vnet_ip4_nbr_counters_t_handler(vl_api_vnet_ip4_nbr_counters_t *mp)
static f64 vlib_last_vector_length_per_node(vlib_main_t *vm)
volatile u32 release_hint
static counter_t vlib_get_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
Get the value of a simple counter Scrapes the entire set of per-thread counters.
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
Combined stats counters structure per interface.
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
#define VLIB_INIT_FUNCTION(x)
vpe_client_stats_registration_t ** regs_tmp
static void do_ip4_fib_counters(stats_main_t *sm)
vlib_combined_counter_main_t * combined_sw_if_counters
enum adj_walk_rc_t_ adj_walk_rc_t
return codes from a adjacency walker callback function
#define IP6_FIB_COUNTER_BATCH_SIZE
struct vl_shmem_hdr_ * shmem_hdr
Binary API shared-memory segment header pointer.
A collection of simple counters.
static adj_walk_rc_t ip4_nbr_stats_cb(adj_index_t ai, void *arg)
void vlib_set_thread_name(char *name)
void * vl_msg_api_alloc(int nbytes)
#define foreach_stats_msg
static void vl_api_want_ip4_fib_stats_t_handler(vl_api_want_ip4_fib_stats_t *mp)
vl_shmem_hdr_t * shmem_hdr
static heap_elt_t * first(heap_header_t *h)
void dsunlock(stats_main_t *sm)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
struct ip4_nbr_stats_ctx_t_ ip4_nbr_stats_ctx_t
The context passed when collecting adjacency counters.
vl_api_ip4_nbr_counter_t * counters
A vector of ip4 nbr counters.
Want Per Interface simple Stats, register for continuous stats.
static void vl_api_want_per_interface_combined_stats_t_handler(vl_api_want_per_interface_combined_stats_t *mp)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u32 ** enable_all_client_reg(u32 **registrations)
counter_t packets
packet counter
static void vl_api_want_ip6_fib_stats_t_handler(vl_api_want_ip6_fib_stats_t *mp)
struct ip_adjacency_t_::@38::@39 nbr
IP_LOOKUP_NEXT_ARP/IP_LOOKUP_NEXT_REWRITE.
static void vl_api_want_ip4_nbr_stats_t_handler(vl_api_want_ip4_nbr_stats_t *mp)
u32 vlib_combined_counter_n_counters(const vlib_combined_counter_main_t *cm)
The number of counters (not the number of per-thread counters)
static void vl_api_want_ip6_nbr_stats_t_handler(vl_api_want_ip6_nbr_stats_t *mp)
void vl_msg_api_free(void *)
#define pool_put(P, E)
Free an object E in pool P.
vlib_simple_counter_main_t * sw_if_counters
load_balance_main_t load_balance_main
The one instance of load-balance main.
static void ip4_nbr_ship(stats_main_t *sm, ip4_nbr_stats_ctx_t *ctx)
#define SIMPLE_COUNTER_BATCH_SIZE
void unix_shared_memory_queue_lock(unix_shared_memory_queue_t *q)
#define COMBINED_COUNTER_BATCH_SIZE
vl_api_ip6_nbr_counter_t * counters
A vector of ip6 nbr counters.
vlib_combined_counter_main_t adjacency_counters
Adjacency packet counters.
static void do_simple_interface_counters(stats_main_t *sm)
The context passed when collecting adjacency counters.
API main structure, used by both vpp and binary API clients.
int clear_client_for_stat(u32 reg, u32 item, u32 client_index)
union ip_adjacency_t_::@38 sub_type
void clib_bihash_foreach_key_value_pair(clib_bihash *h, void *callback, void *arg)
Visit active (key,value) pairs in a bi-hash table.
u8 * format_vnet_interface_combined_counters(u8 *s, va_list *args)
u32 sw_if_index
The SW IF index all these adjs belong to.
fib_node_index_t ft_index
Index into FIB vector.
static void add_routes_in_fib(BVT(clib_bihash_kv)*kvp, void *arg)
static vpe_client_registration_t * get_client_for_stat(u32 reg, u32 item, u32 client_index)
static_always_inline uword vlib_get_thread_index(void)
u32 ft_table_id
Table ID (hash key) for this FIB.
static void vlib_get_combined_counter(const vlib_combined_counter_main_t *cm, u32 index, vlib_counter_t *result)
Get the value of a combined counter, never called in the speed path Scrapes the entire set of per-thr...
#define vec_free(V)
Free vector's memory (no header).
#define IP4_FIB_COUNTER_BATCH_SIZE
static void * clib_mem_set_heap(void *heap)
Want Interface Combined Stats, register for continuous stats.
#define clib_warning(format, args...)
This table stores the routes that are used to forward traffic.
#define clib_memcpy(a, b, c)
unix_shared_memory_queue_t * vl_api_client_index_to_input_queue(u32 index)
static void vnet_interface_counter_unlock(vnet_interface_main_t *im)
static void vl_api_vnet_ip6_fib_counters_t_handler(vl_api_vnet_ip6_fib_counters_t *mp)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
Want IP6 FIB Stats, register for continuous stats.
u32 adj_index_t
An index for adjacencies.
vl_api_ip6_fib_counter_t c[count]
Simple per interface stats counters structure.
static void vnet_interface_counter_lock(vnet_interface_main_t *im)
struct ip6_nbr_stats_ctx_t_ ip6_nbr_stats_ctx_t
The context passed when collecting adjacency counters.
void vl_msg_api_send_shmem(unix_shared_memory_queue_t *q, u8 *elem)
void stats_dslock_with_hint(int hint, int tag)
u64 tx_packets
packet counter
static void ip6_nbr_ship(stats_main_t *sm, ip6_nbr_stats_ctx_t *ctx)
#define STATS_RELEASE_DELAY_NS
The context passed when collecting adjacency counters.
static void setup_message_id_table(api_main_t *am)
uword ** stats_registration_hash
int stats_memclnt_delete_callback(u32 client_index)
static void do_combined_interface_counters(stats_main_t *sm)
vpe_client_stats_registration_t ** stats_registrations
u64 counter_t
64bit counters
Simple stats counters structure.
Want IP6 NBR Stats, register for continuous stats.
u32 stats_poll_interval_in_seconds
ip6_fib_table_instance_t ip6_table[IP6_FIB_NUM_TABLES]
The two FIB tables; fwding and non-fwding.
void dslock(stats_main_t *sm, int release_hint, int tag)
vl_api_ip4_fib_counter_t c[count]
counter_t bytes
byte counter
Want IP4 FIB Stats, register for continuous stats.
data_structure_lock_t * data_structure_lock
u32 ** init_client_reg(u32 **registrations)
index_t dpoi_index
the index of objects of that type
void vl_msg_api_send_shmem_nolock(unix_shared_memory_queue_t *q, u8 *elem)
struct ip4_fib_t_ * v4_fibs
Vector of MTries.
u8 * format_vnet_interface_simple_counters(u8 *s, va_list *args)
void unix_shared_memory_queue_unlock(unix_shared_memory_queue_t *q)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vpe_client_registration_t * get_clients_for_stat(u32 reg, u32 item)
vnet_interface_main_t * interface_main
static void vl_api_want_stats_t_handler(vl_api_want_stats_t *mp)
#define hash_foreach_pair(p, v, body)
Iterate over hash pairs.
static void clear_client_reg(u32 **registrations)
vnet_sw_interface_t * sw_interfaces
#define clib_unix_warning(format, args...)
A collection of combined counters.
Want Per Interface Combined Stats, register for continuous stats.
uword * fib_entry_by_dst_address[33]
#define clib_mem_unaligned(pointer, type)
static void vl_api_vnet_ip6_nbr_counters_t_handler(vl_api_vnet_ip6_nbr_counters_t *mp)
static void * clib_mem_alloc_aligned(uword size, uword align)
static void do_ip6_fib_counters(stats_main_t *sm)
static void do_simple_per_interface_counters(stats_main_t *sm)
ip4_main_t ip4_main
Global ip4 main structure.
static vlib_thread_main_t * vlib_get_thread_main()
Reply for vnet_get_summary_stats request.
struct fib_table_t_ * fibs
Vector of FIBs.
#define vec_foreach(var, vec)
Vector iterator.
Want IP4 NBR Stats, register for continuous stats.
static void vl_api_want_interface_combined_stats_t_handler(vl_api_want_interface_combined_stats_t *mp)
void * vlib_worker_thread_bootstrap_fn(void *arg)
#define CLIB_MEMORY_BARRIER()
static void do_combined_per_interface_counters(stats_main_t *sm)
static void vl_api_vnet_interface_combined_counters_t_handler(vl_api_vnet_interface_combined_counters_t *mp)
void stats_dsunlock(int hint, int tag)
#define CLIB_CACHE_LINE_BYTES
struct fib_table_t_ * fibs
static void vl_api_want_per_interface_simple_stats_t_handler(vl_api_want_per_interface_simple_stats_t *mp)
static void do_ip4_nbr_counters(stats_main_t *sm)
vl_api_ip6_nbr_counter_t c[count]
A protocol Independent FIB table.
struct _unix_shared_memory_queue unix_shared_memory_queue_t
u64 rx_packets
packet counter
static uword pool_elts(void *v)
Number of active elements in a pool.