FD.io VPP
v16.09
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
stats.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 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:
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
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.
14
*/
15
#ifndef __included_stats_h__
16
#define __included_stats_h__
17
18
#include <
time.h
>
19
#include <
vlib/vlib.h
>
20
#include <
vnet/vnet.h
>
21
#include <
vnet/interface.h
>
22
#include <pthread.h>
23
#include <
vlib/threads.h
>
24
#include <
vlib/unix/unix.h
>
25
#include <
vlibmemory/api.h
>
26
#include <
vlibmemory/unix_shared_memory_queue.h
>
27
28
typedef
struct
29
{
30
u32
client_index
;
/* in memclnt registration pool */
31
u32
client_pid
;
32
}
vpe_client_registration_t
;
33
34
typedef
struct
35
{
36
volatile
u32
lock
;
37
volatile
u32
release_hint
;
38
u32
thread_id
;
39
u32
count
;
40
int
tag
;
41
}
data_structure_lock_t
;
42
43
typedef
struct
44
{
45
void
*
mheap
;
46
pthread_t
thread_self
;
47
pthread_t
thread_handle
;
48
49
u32
stats_poll_interval_in_seconds
;
50
u32
enable_poller
;
51
52
uword
*
stats_registration_hash
;
53
vpe_client_registration_t
*
stats_registrations
;
54
55
/* control-plane data structure lock */
56
data_structure_lock_t
*
data_structure_lock
;
57
58
/* bail out of FIB walk if set */
59
clib_longjmp_t
jmp_buf
;
60
61
/* convenience */
62
vlib_main_t
*
vlib_main
;
63
vnet_main_t
*
vnet_main
;
64
vnet_interface_main_t
*
interface_main
;
65
api_main_t
*
api_main
;
66
}
stats_main_t
;
67
68
stats_main_t
stats_main
;
69
70
void
dslock
(
stats_main_t
* sm,
int
release_hint,
int
tag);
71
void
dsunlock
(
stats_main_t
* sm);
72
73
#endif
/* __included_stats_h__ */
74
75
/*
76
* fd.io coding-style-patch-verification: ON
77
*
78
* Local Variables:
79
* eval: (c-set-style "gnu")
80
* End:
81
*/
data_structure_lock_t
Definition:
stats.h:34
vnet_interface_main_t
Definition:
interface.h:475
stats_main_t::thread_handle
pthread_t thread_handle
Definition:
stats.h:47
data_structure_lock_t::tag
int tag
Definition:
stats.h:40
data_structure_lock_t::thread_id
u32 thread_id
Definition:
stats.h:38
stats_main
stats_main_t stats_main
Definition:
stats.h:68
time.h
stats_main_t::enable_poller
u32 enable_poller
Definition:
stats.h:50
stats_main_t::vlib_main
vlib_main_t * vlib_main
Definition:
stats.h:62
stats_main_t::stats_registration_hash
uword * stats_registration_hash
Definition:
stats.h:52
stats_main_t::stats_registrations
vpe_client_registration_t * stats_registrations
Definition:
stats.h:53
unix_shared_memory_queue.h
data_structure_lock_t::release_hint
volatile u32 release_hint
Definition:
stats.h:37
data_structure_lock_t::count
u32 count
Definition:
stats.h:39
stats_main_t::thread_self
pthread_t thread_self
Definition:
stats.h:46
data_structure_lock_t::lock
volatile u32 lock
Definition:
stats.h:36
vpe_client_registration_t::client_pid
u32 client_pid
Definition:
stats.h:31
threads.h
interface.h
clib_longjmp_t
Definition:
longjmp.h:100
unix.h
vnet.h
stats_main_t::mheap
void * mheap
Definition:
stats.h:45
api_main_t
Definition:
api.h:112
dsunlock
void dsunlock(stats_main_t *sm)
Definition:
stats.c:88
stats_main_t::jmp_buf
clib_longjmp_t jmp_buf
Definition:
stats.h:59
stats_main_t::api_main
api_main_t * api_main
Definition:
stats.h:65
dslock
void dslock(stats_main_t *sm, int release_hint, int tag)
Definition:
stats.c:62
vlib.h
vnet_main_t
Definition:
vnet.h:59
u32
unsigned int u32
Definition:
types.h:88
vpe_client_registration_t
Definition:
stats.h:28
stats_main_t::stats_poll_interval_in_seconds
u32 stats_poll_interval_in_seconds
Definition:
stats.h:49
uword
u64 uword
Definition:
types.h:112
stats_main_t::data_structure_lock
data_structure_lock_t * data_structure_lock
Definition:
stats.h:56
stats_main_t::interface_main
vnet_interface_main_t * interface_main
Definition:
stats.h:64
api.h
vlib_main_t
Definition:
main.h:59
vpe_client_registration_t::client_index
u32 client_index
Definition:
stats.h:30
stats_main_t::vnet_main
vnet_main_t * vnet_main
Definition:
stats.h:63
stats_main_t
Definition:
stats.h:43
vpp
stats
stats.h
Generated on Fri Nov 18 2016 06:18:04 for FD.io VPP by
1.8.11