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 */
35 volatile int segment_ready;
38 * Cached pointers to vector quantities,
39 * MUST invalidate when the epoch changes
41 vlib_counter_t **intfc_rx_counters;
42 vlib_counter_t **intfc_tx_counters;
44 u64 *thread_0_error_counts;
45 u64 source_address_match_error_index;
47 /* mapped stats segment object */
48 ssvm_private_t stat_segment;
50 /* Socket client object */
51 socket_client_main_t *socket_client_main;
53 /* Spinlock for the stats segment */
54 clib_spinlock_t *stat_segment_lockp;
59 extern stat_client_main_t stat_client_main;
61 #endif /* __included_stat_client_h__ */
65 * fd.io coding-style-patch-verification: ON
68 * eval: (c-set-style "gnu")