3 * mdata.h - Buffer metadata change tracker
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:
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #ifndef __included_mdata_h__
19 #define __included_mdata_h__
21 #include <vnet/vnet.h>
23 #include <vppinfra/hash.h>
24 #include <vppinfra/error.h>
27 * buffer metadata change tracker definitions
32 /** Node index, ~0 means no data from this run */
34 /** buffer metadata, cast to vlib_buffer_t as needed */
40 /** API message ID base */
43 /** Per-thread buffer metadata before calling node fcn */
44 mdata_t **before_per_thread;
46 /** Spinlock to protect modified metadata by node */
47 clib_spinlock_t modify_lock;
49 /** Modified metadata by node */
53 vlib_main_t *vlib_main;
54 vnet_main_t *vnet_main;
57 extern mdata_main_t mdata_main;
59 #endif /* __included_mdata_h__ */
62 * fd.io coding-style-patch-verification: ON
65 * eval: (c-set-style "gnu")