FD.io VPP
v20.01-48-g3e0dafb74
Vector Packet Processing
mdata.h
Go to the documentation of this file.
1
2
/*
3
* mdata.h - Buffer metadata change tracker
4
*
5
* Copyright (c) 2019 Cisco and/or its affiliates.
6
* Licensed under the Apache License, Version 2.0 (the "License");
7
* you may not use this file except in compliance with the License.
8
* You may obtain a copy of the License at:
9
*
10
* http://www.apache.org/licenses/LICENSE-2.0
11
*
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS,
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
* See the License for the specific language governing permissions and
16
* limitations under the License.
17
*/
18
#ifndef __included_mdata_h__
19
#define __included_mdata_h__
20
21
#include <
vnet/vnet.h
>
22
23
#include <
vppinfra/hash.h
>
24
#include <
vppinfra/error.h
>
25
26
/** @file buffer metadata change tracker definitions
27
*/
28
29
typedef
struct
30
{
31
/** Node index, ~0 means no data from this run */
32
u32
node_index
;
33
/** buffer metadata, cast to vlib_buffer_t as needed */
34
u8
mdata[128];
35
}
mdata_t
;
36
37
typedef
struct
38
{
39
/** API message ID base */
40
u16
msg_id_base
;
41
42
/** Per-thread buffer metadata before calling node fcn */
43
mdata_t
**
before_per_thread
;
44
45
/** Spinlock to protect modified metadata by node */
46
clib_spinlock_t
modify_lock
;
47
48
/** Modified metadata by node */
49
mdata_t
*
modifies
;
50
51
/* convenience */
52
vlib_main_t
*
vlib_main
;
53
vnet_main_t
*
vnet_main
;
54
}
mdata_main_t
;
55
56
extern
mdata_main_t
mdata_main
;
57
58
#endif
/* __included_mdata_h__ */
59
60
/*
61
* fd.io coding-style-patch-verification: ON
62
*
63
* Local Variables:
64
* eval: (c-set-style "gnu")
65
* End:
66
*/
mdata_main_t::msg_id_base
u16 msg_id_base
API message ID base.
Definition:
mdata.h:40
u8
unsigned char u8
Definition:
types.h:56
hash.h
mdata_main_t::modify_lock
clib_spinlock_t modify_lock
Spinlock to protect modified metadata by node.
Definition:
mdata.h:46
u32
unsigned int u32
Definition:
types.h:88
mdata_main_t::vnet_main
vnet_main_t * vnet_main
Definition:
mdata.h:53
mdata_t
Definition:
mdata.h:29
u16
unsigned short u16
Definition:
types.h:57
vnet.h
mdata_main_t::before_per_thread
mdata_t ** before_per_thread
Per-thread buffer metadata before calling node fcn.
Definition:
mdata.h:43
clib_spinlock_t
Definition:
lock.h:51
vnet_main_t
Definition:
vnet.h:51
mdata_main
mdata_main_t mdata_main
Definition:
mdata.c:33
mdata_t::node_index
u32 node_index
Node index, ~0 means no data from this run.
Definition:
mdata.h:32
vlib_main_t
Definition:
main.h:83
mdata_main_t::vlib_main
vlib_main_t * vlib_main
Definition:
mdata.h:52
error.h
mdata_main_t::modifies
mdata_t * modifies
Modified metadata by node.
Definition:
mdata.h:49
mdata_main_t
Definition:
mdata.h:37
src
plugins
mdata
mdata.h
Generated on Wed Sep 9 2020 00:03:53 for FD.io VPP by
1.8.13