X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp%2Fstats%2Fstats.h;h=f21451d352bcdbfa9ad6633b5ff3669855f46936;hb=58492a83722caf1c49977d73abf931418ce1f8f2;hp=3d30e3797961f1836d0087560b73d994bab02207;hpb=ff233898cef20c434a6ce45a0a3e607e8f7dc0e7;p=vpp.git diff --git a/src/vpp/stats/stats.h b/src/vpp/stats/stats.h index 3d30e379796..f21451d352b 100644 --- a/src/vpp/stats/stats.h +++ b/src/vpp/stats/stats.h @@ -25,8 +25,8 @@ #include #include #include -#include #include +#include typedef struct { @@ -51,30 +51,6 @@ typedef CLIB_PACKED (struct }) ip4_route_t; /* *INDENT-ON* */ -/* see interface.api */ -typedef struct -{ - u32 sw_if_index; - u64 drop; - u64 punt; - u64 rx_ip4; - u64 rx_ip6; - u64 rx_no_buffer; - u64 rx_miss; - u64 rx_error; - u64 tx_error; - u64 rx_mpls; -} vnet_simple_counter_t; - -typedef struct -{ - u32 sw_if_index; - u64 rx_packets; /**< packet counter */ - u64 rx_bytes; /**< byte counter */ - u64 tx_packets; /**< packet counter */ - u64 tx_bytes; /**< byte counter */ -} vnet_combined_counter_t; - typedef struct { ip6_address_t address; @@ -119,7 +95,6 @@ typedef struct } vpe_client_stats_registration_t; - typedef struct { void *mheap; @@ -181,6 +156,20 @@ typedef struct vpe_client_stats_registration_t **regs_tmp; vpe_client_registration_t **clients_tmp; + /* statistics segment */ + uword *directory_vector_by_name; + stat_segment_directory_entry_t *directory_vector; + clib_spinlock_t *stat_segment_lockp; + clib_socket_t *socket; + u8 *socket_name; + ssize_t memory_size; + u8 node_counters_enabled; + void *heap; + stat_segment_shared_header_t *shared_header; /* pointer to shared memory segment */ + int memfd; + + u64 last_input_packets; + /* convenience */ vlib_main_t *vlib_main; vnet_main_t *vnet_main; @@ -190,6 +179,8 @@ typedef struct extern stats_main_t stats_main; +void do_stat_segment_updates (stats_main_t * sm); + #endif /* __included_stats_h__ */ /*