2 * Copyright (c) 2018 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
15 #ifndef __included_stat_client_h__
16 #define __included_stat_client_h__
18 #include <vlib/vlib.h>
19 #include <vppinfra/socket.h>
21 #include <vlibapi/api.h>
22 #include <vlibmemory/api.h>
23 #include <vlibmemory/socket_api.h>
24 #include <vlibmemory/socket_client.h>
25 #include <vpp/stats/stats.h>
31 /* Cached pointers to scalar quantities, these wont change */
34 f64 *last_runtime_ptr;
35 f64 *last_runtime_stats_clear_ptr;
37 volatile int segment_ready;
40 * Cached pointers to vector quantities,
41 * MUST invalidate when the epoch changes
43 vlib_counter_t **intfc_rx_counters;
44 vlib_counter_t **intfc_tx_counters;
47 u64 *thread_0_error_counts;
48 u64 source_address_match_error_index;
50 /* mapped stats segment object */
51 ssvm_private_t stat_segment;
53 /* Socket client object */
54 socket_client_main_t *socket_client_main;
56 /* Spinlock for the stats segment */
57 clib_spinlock_t *stat_segment_lockp;
62 extern stat_client_main_t stat_client_main;
64 #endif /* __included_stat_client_h__ */
68 * fd.io coding-style-patch-verification: ON
71 * eval: (c-set-style "gnu")