FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
buffer.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2019 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 include_dpdk_buffer_h
17 #define include_dpdk_buffer_h
18 
19 #define rte_mbuf_from_vlib_buffer(x) (((struct rte_mbuf *)x) - 1)
20 #define vlib_buffer_from_rte_mbuf(x) ((vlib_buffer_t *)(x+1))
21 
22 extern struct rte_mempool **dpdk_mempool_by_buffer_pool_index;
23 extern struct rte_mempool **dpdk_no_cache_mempool_by_buffer_pool_index;
24 
26 
27 #endif /* include_dpdk_buffer_h */
28 
29 /** @endcond */
30 /*
31  * fd.io coding-style-patch-verification: ON
32  *
33  * Local Variables:
34  * eval: (c-set-style "gnu")
35  * End:
36  */
struct rte_mempool ** dpdk_no_cache_mempool_by_buffer_pool_index
Definition: buffer.c:34
struct rte_mempool ** dpdk_mempool_by_buffer_pool_index
Definition: buffer.c:33
vlib_main_t * vm
Definition: in2out_ed.c:1582
clib_error_t * dpdk_buffer_pools_create(vlib_main_t *vm)
Definition: buffer.c:430