3102eccea3987f8577f84c442ad2628eed9144fa
[vpp.git] / vnet / vnet / plugin / p1.c
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 /* 
16  * This file and in fact the entire directory shouldn't even exist.
17  *
18  * Unfortunately, various things malfunction when we try to go there. 
19  * Plugin DLL's end up with their own copies of critical
20  * data structures. No one of these problems would be tough to fix, 
21  * but there are quite a number of them.
22  */
23
24 /* 
25  * Make certain that plugin .dll's which reference the following functions
26  * can find them...
27  */
28
29 #if DPDK > 0
30 #define foreach_dpdk_plugin_reference           \
31 _(rte_calloc)                                   \
32 _(rte_free)                                     \
33 _(rte_malloc)                                   \
34 _(rte_zmalloc)                                  \
35 _(rte_malloc_virt2phy)                          \
36 _(rte_eal_get_configuration)
37 #else
38 #define foreach_dpdk_plugin_reference
39 #endif
40
41 #define _(a) void a (void);
42 foreach_dpdk_plugin_reference
43 #undef _
44
45 void *vnet_library_plugin_references[] =
46   {
47 #define _(a) &a,
48     foreach_dpdk_plugin_reference
49 #undef _
50   };
51
52 void vnet_library_plugin_reference(void) { }