FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
stat_segment_shared.h
Go to the documentation of this file.
1
/*
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:
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
16
#ifndef included_stat_segment_shared_h
17
#define included_stat_segment_shared_h
18
19
typedef
enum
20
{
21
STAT_DIR_TYPE_ILLEGAL
= 0,
22
STAT_DIR_TYPE_SCALAR_INDEX
,
23
STAT_DIR_TYPE_COUNTER_VECTOR_SIMPLE
,
24
STAT_DIR_TYPE_COUNTER_VECTOR_COMBINED
,
25
STAT_DIR_TYPE_ERROR_INDEX
,
26
STAT_DIR_TYPE_NAME_VECTOR
,
27
STAT_DIR_TYPE_EMPTY
,
28
STAT_DIR_TYPE_SYMLINK
,
29
}
stat_directory_type_t
;
30
31
typedef
struct
32
{
33
stat_directory_type_t
type
;
34
union
{
35
struct
36
{
37
uint32_t
index1
;
38
uint32_t
index2
;
39
};
40
uint64_t
index
;
41
uint64_t
value
;
42
void
*
data
;
43
};
44
char
name
[128];
// TODO change this to pointer to "somewhere"
45
}
stat_segment_directory_entry_t
;
46
47
/*
48
* Shared header first in the shared memory segment.
49
*/
50
typedef
struct
51
{
52
uint64_t
version
;
53
void
*
base
;
54
volatile
uint64_t
epoch
;
55
volatile
uint64_t
in_progress
;
56
volatile
stat_segment_directory_entry_t
*
directory_vector
;
57
volatile
uint64_t **
error_vector
;
58
}
stat_segment_shared_header_t
;
59
60
static
inline
void
*
61
stat_segment_pointer
(
void
*start, uint64_t
offset
)
62
{
63
return
((
char
*) start +
offset
);
64
}
65
66
#endif
/* included_stat_segment_shared_h */
STAT_DIR_TYPE_COUNTER_VECTOR_COMBINED
@ STAT_DIR_TYPE_COUNTER_VECTOR_COMBINED
Definition:
stat_segment_shared.h:24
stat_segment_shared_header_t::base
void * base
Definition:
stat_segment_shared.h:53
stat_segment_shared_header_t::error_vector
volatile uint64_t ** error_vector
Definition:
stat_segment_shared.h:57
stat_segment_directory_entry_t::data
void * data
Definition:
stat_segment_shared.h:42
name
string name[64]
Definition:
fib.api:25
STAT_DIR_TYPE_NAME_VECTOR
@ STAT_DIR_TYPE_NAME_VECTOR
Definition:
stat_segment_shared.h:26
STAT_DIR_TYPE_COUNTER_VECTOR_SIMPLE
@ STAT_DIR_TYPE_COUNTER_VECTOR_SIMPLE
Definition:
stat_segment_shared.h:23
stat_directory_type_t
stat_directory_type_t
Definition:
stat_segment_shared.h:19
stat_segment_directory_entry_t::index1
uint32_t index1
Definition:
stat_segment_shared.h:37
stat_segment_shared_header_t::version
uint64_t version
Definition:
stat_segment_shared.h:52
stat_segment_directory_entry_t::index
uint64_t index
Definition:
stat_segment_shared.h:40
STAT_DIR_TYPE_EMPTY
@ STAT_DIR_TYPE_EMPTY
Definition:
stat_segment_shared.h:27
stat_segment_pointer
static void * stat_segment_pointer(void *start, uint64_t offset)
Definition:
stat_segment_shared.h:61
stat_segment_directory_entry_t::value
uint64_t value
Definition:
stat_segment_shared.h:41
stat_segment_shared_header_t::directory_vector
volatile stat_segment_directory_entry_t * directory_vector
Definition:
stat_segment_shared.h:56
stat_segment_shared_header_t
Definition:
stat_segment_shared.h:50
STAT_DIR_TYPE_SYMLINK
@ STAT_DIR_TYPE_SYMLINK
Definition:
stat_segment_shared.h:28
stat_segment_directory_entry_t
Definition:
stat_segment_shared.h:31
stat_segment_shared_header_t::in_progress
volatile uint64_t in_progress
Definition:
stat_segment_shared.h:55
clib_bihash_value
template key/value backing page structure
Definition:
bihash_doc.h:44
STAT_DIR_TYPE_SCALAR_INDEX
@ STAT_DIR_TYPE_SCALAR_INDEX
Definition:
stat_segment_shared.h:22
stat_segment_directory_entry_t::index2
uint32_t index2
Definition:
stat_segment_shared.h:38
STAT_DIR_TYPE_ILLEGAL
@ STAT_DIR_TYPE_ILLEGAL
Definition:
stat_segment_shared.h:21
stat_segment_directory_entry_t::type
stat_directory_type_t type
Definition:
stat_segment_shared.h:33
STAT_DIR_TYPE_ERROR_INDEX
@ STAT_DIR_TYPE_ERROR_INDEX
Definition:
stat_segment_shared.h:25
stat_segment_shared_header_t::epoch
volatile uint64_t epoch
Definition:
stat_segment_shared.h:54
src
vpp
stats
stat_segment_shared.h
Generated on Sat Jan 8 2022 10:05:41 for FD.io VPP by
1.8.17