aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Foggoa <tfoggoa@cisco.com>2016-03-17 14:22:34 -0400
committerTodd Foggoa <tfoggoa@cisco.com>2016-03-17 14:23:14 -0400
commit4ea4ecdda9dbc01f9776b63d3a91397b34e46f13 (patch)
treec9ff364cb93d6149c70c40eaae4d6c98693f2db2
parent89b3398a81ab0bcfc891ad78b24dbc8721bbc514 (diff)
Bring back p1.c so plugins can see DPDK symbols
Change-Id: Ia450c9bc6d00fbd054d41a462366f826121d781d Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
-rw-r--r--vnet/Makefile.am14
-rw-r--r--vnet/vnet/plugin/p1.c95
-rw-r--r--vpp/Makefile.am2
3 files changed, 16 insertions, 95 deletions
diff --git a/vnet/Makefile.am b/vnet/Makefile.am
index ff8a31dae26..c0115eb1368 100644
--- a/vnet/Makefile.am
+++ b/vnet/Makefile.am
@@ -16,6 +16,7 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
AM_CFLAGS = -Wall @DPDK@ @VIRL@ @IPSEC@ @VCGN@ @IPV6SR@
libvnet_la_SOURCES =
+libvnetplugin_la_SOURCES =
nobase_include_HEADERS =
noinst_PROGRAMS =
@@ -41,7 +42,6 @@ nobase_include_HEADERS += \
vnet/interface_funcs.h \
vnet/l3_types.h \
vnet/pipeline.h \
- vnet/plugin/plugin.h \
vnet/replication.h \
vnet/rewrite.h \
vnet/vnet.h
@@ -636,7 +636,17 @@ nobase_include_HEADERS += \
vnet/unix/tuntap.h \
vnet/unix/tapcli.h
-lib_LTLIBRARIES = libvnet.la
+########################################
+# Plugin client library
+########################################
+
+libvnetplugin_la_SOURCES += \
+ vnet/plugin/p1.c
+
+nobase_include_HEADERS += \
+ vnet/plugin/plugin.h
+
+lib_LTLIBRARIES = libvnet.la libvnetplugin.la
dpdk_libs =
diff --git a/vnet/vnet/plugin/p1.c b/vnet/vnet/plugin/p1.c
index 69f8f5c056a..3102eccea39 100644
--- a/vnet/vnet/plugin/p1.c
+++ b/vnet/vnet/plugin/p1.c
@@ -14,8 +14,7 @@
*/
/*
* This file and in fact the entire directory shouldn't even exist.
- * Vnet ought to be a dynamic library.
-
+ *
* Unfortunately, various things malfunction when we try to go there.
* Plugin DLL's end up with their own copies of critical
* data structures. No one of these problems would be tough to fix,
@@ -27,116 +26,26 @@
* can find them...
*/
-#define foreach_plugin_reference \
-_(unformat_vnet_hw_interface) \
-_(unformat_vnet_sw_interface) \
-_(format_vnet_hw_interface) \
-_(format_vnet_sw_interface) \
-_(format_vnet_sw_interface_name_override) \
-_(vnet_hw_interface_rx_redirect_to_node) \
-_(vnet_config_add_feature) \
-_(vnet_config_del_feature) \
-_(vnet_get_main) \
-_(_vlib_init_function_l2_init) \
-_(_vlib_init_function_pg_init) \
-_(_vlib_init_function_ip_main_init) \
-_(_vlib_init_function_ethernet_init) \
-_(_vlib_init_function_ethernet_arp_init) \
-_(_vlib_config_function_dpdk_config) \
-_(l2input_intf_bitmap_enable) \
-_(ip4_main) \
-_(ip6_main) \
-_(format_ip4_address) \
-_(unformat_ip4_address) \
-_(ip4_address_compare) \
-_(ip6_address_compare) \
-_(format_ip6_address) \
-_(format_ip6_address_and_length) \
-_(udp_register_dst_port) \
-_(ethernet_register_input_type) \
-_(ethernet_set_flags) \
-_(format_ip6_address) \
-_(unformat_ip6_address) \
-_(ip6_main) \
-_(find_ip6_fib_by_table_index_or_id) \
-_(format_ethernet_address) \
-_(unformat_ethernet_address) \
-_(unformat_ethernet_interface) \
-_(ethernet_register_l2_input) \
-_(ethernet_register_l3_redirect) \
-_(unformat_pg_payload) \
-_(format_ip4_address_and_length) \
-_(ip_incremental_checksum) \
-_(ethernet_sw_interface_set_l2_mode) \
-_(vnet_create_loopback_interface) \
-_(ethernet_set_rx_redirect) \
-_(ethernet_set_flags) \
-_(ethernet_get_main) \
-_(ethernet_get_interface) \
-_(vnet_hw_interface_set_flags) \
-_(vnet_sw_interface_set_flags) \
-_(vnet_create_sw_interface) \
-_(vnet_delete_sw_interface) \
-_(vnet_get_main) \
-_(pg_stream_add) \
-_(pg_stream_del) \
-_(pg_stream_enable_disable) \
-_(pg_main) \
-_(ip_main) \
-_(unformat_pg_edit) \
-_(unformat_tcp_udp_port) \
-_(unformat_pg_number) \
-_(_vlib_init_function_ip4_lookup_init) \
-_(_vlib_init_function_ip6_lookup_init) \
-_(ip4_register_protocol) \
-_(ip6_register_protocol) \
-_(ip_csum_and_memcpy)
-
#if DPDK > 0
#define foreach_dpdk_plugin_reference \
-_(dpdk_set_next_node) \
-_(dpdk_worker_thread) \
-_(dpdk_io_thread) \
-_(dpdk_frame_queue_dequeue) \
-_(vlib_get_handoff_queue_elt) \
-_(dpdk_get_handoff_node_index) \
-_(dpdk_set_flowcontrol_callback) \
-_(dpdk_interface_tx_vector) \
_(rte_calloc) \
_(rte_free) \
_(rte_malloc) \
_(rte_zmalloc) \
_(rte_malloc_virt2phy) \
-_(rte_eal_get_configuration) \
-_(post_sw_interface_set_flags) \
-_(dpdk_get_admin_up_down_in_progress) \
-_(efd_config) \
-_(dpdk_set_mac_address) \
-_(dpdk_set_mc_filter)
+_(rte_eal_get_configuration)
#else
#define foreach_dpdk_plugin_reference
#endif
-#if IPV6SR > 0
-#define foreach_ip6_sr_plugin_reference \
-_(vnet_register_sr_app_callback) \
-_(format_ip6_sr_header)
-#else
-#define foreach_ip6_sr_plugin_reference
-#endif
-
#define _(a) void a (void);
-foreach_plugin_reference
foreach_dpdk_plugin_reference
-foreach_ip6_sr_plugin_reference
#undef _
void *vnet_library_plugin_references[] =
{
#define _(a) &a,
- foreach_plugin_reference
foreach_dpdk_plugin_reference
- foreach_ip6_sr_plugin_reference
#undef _
};
diff --git a/vpp/Makefile.am b/vpp/Makefile.am
index 06ec713e703..b66daec9477 100644
--- a/vpp/Makefile.am
+++ b/vpp/Makefile.am
@@ -68,6 +68,8 @@ vpp_LDADD += -lvnet
vpp_LDADD += -lsvm -lsvmdb -lrt
+vpp_LDADD += -lvnetplugin
+
if WITH_DPDK
vpp_LDADD += -l:libdpdk.a
endif