Declare node, hw_interface_class and device_class instances as external 34/534/2
authorDamjan Marion <[email protected]>
Mon, 14 Mar 2016 19:02:35 +0000 (20:02 +0100)
committerDamjan Marion <[email protected]>
Mon, 14 Mar 2016 19:43:12 +0000 (20:43 +0100)
This fixes issue observed on Ubuntu 16.04 where
dynamic loader is not finding correct instance of
specific structure.

Change-Id: I618d0933c7e171b8a9b40495b36894785af7790a
Signed-off-by: Damjan Marion <[email protected]>
vnet/vnet/devices/dpdk/dpdk.h
vnet/vnet/devices/ssvm/ssvm_eth.h
vnet/vnet/ethernet/ethernet.h
vnet/vnet/flow/flow_report.h
vnet/vnet/gre/gre.h
vnet/vnet/hdlc/hdlc.h
vnet/vnet/ip/ip_frag.h
vnet/vnet/mpls-gre/mpls.h
vnet/vnet/ppp/ppp.h
vppinfra/vppinfra/vector_sse2.h

index 1635c0a..656f39e 100644 (file)
@@ -65,7 +65,7 @@
 #define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
 #define NB_MBUF   (32<<10)
 
-vnet_device_class_t dpdk_device_class;
+extern vnet_device_class_t dpdk_device_class;
 extern vlib_node_registration_t dpdk_input_node;
 extern vlib_node_registration_t dpdk_io_input_node;
 extern vlib_node_registration_t handoff_dispatch_node;
index 618fb5c..70d895b 100644 (file)
@@ -31,7 +31,7 @@
 
 #include <ssvm.h>
 
-vnet_device_class_t ssvm_eth_device_class;
+extern vnet_device_class_t ssvm_eth_device_class;
 extern vlib_node_registration_t ssvm_eth_input_node;
 
 #define SSVM_BUFFER_SIZE  \
index 21257c5..ea01463 100644 (file)
@@ -96,7 +96,7 @@ typedef struct ethernet_interface {
   u8 address[6];
 } ethernet_interface_t;
 
-vnet_hw_interface_class_t ethernet_hw_interface_class;
+extern vnet_hw_interface_class_t ethernet_hw_interface_class;
 
 typedef struct {
   /* Name (a c string). */
index 14185bf..e4c7767 100644 (file)
@@ -89,7 +89,7 @@ typedef struct flow_report_main {
 
 flow_report_main_t flow_report_main;
 
-vlib_node_registration_t flow_report_process_node;
+extern vlib_node_registration_t flow_report_process_node;
 
 int vnet_flow_report_enable_disable (u32 sw_if_index, u32 table_index,
                                        int enable_disable);
index 490360d..de9db32 100644 (file)
@@ -26,7 +26,7 @@
 #include <vnet/pg/pg.h>
 #include <vnet/ip/format.h>
 
-vnet_hw_interface_class_t gre_hw_interface_class;
+extern vnet_hw_interface_class_t gre_hw_interface_class;
 
 typedef enum {
 #define gre_error(n,s) GRE_ERROR_##n,
@@ -96,7 +96,7 @@ format_function_t format_gre_header;
 format_function_t format_gre_header_with_length;
 
 extern vlib_node_registration_t gre_input_node;
-vnet_device_class_t gre_device_class;
+extern vnet_device_class_t gre_device_class;
 
 /* Parse gre protocol as 0xXXXX or protocol name.
    In either host or network byte order. */
index e5cbe62..73b15c2 100644 (file)
@@ -44,7 +44,7 @@
 #include <vnet/hdlc/packet.h>
 #include <vnet/pg/pg.h>
 
-vnet_hw_interface_class_t hdlc_hw_interface_class;
+extern vnet_hw_interface_class_t hdlc_hw_interface_class;
 
 typedef enum {
 #define hdlc_error(n,s) HDLC_ERROR_##n,
index 7623865..118acf8 100644 (file)
@@ -43,8 +43,8 @@
 #define IP4_FRAG_NODE_NAME "ip4-frag"
 #define IP6_FRAG_NODE_NAME "ip6-frag"
 
-vlib_node_registration_t ip4_frag_node;
-vlib_node_registration_t ip6_frag_node;
+extern vlib_node_registration_t ip4_frag_node;
+extern vlib_node_registration_t ip6_frag_node;
 
 typedef enum {
   IP4_FRAG_NEXT_IP4_LOOKUP,
index c0a3531..e2fe42e 100644 (file)
@@ -27,7 +27,7 @@ typedef CLIB_PACKED (struct {
   mpls_unicast_header_t labels[0];   /* 4 bytes each */
 }) ip4_gre_and_mpls_header_t;
 
-vnet_hw_interface_class_t mpls_gre_hw_interface_class;
+extern vnet_hw_interface_class_t mpls_gre_hw_interface_class;
 
 typedef enum {
 #define mpls_error(n,s) MPLS_ERROR_##n,
@@ -116,7 +116,7 @@ format_function_t format_mpls_encap_index;
 extern vlib_node_registration_t mpls_input_node;
 extern vlib_node_registration_t mpls_policy_encap_node;
 
-vnet_device_class_t mpls_gre_device_class;
+extern vnet_device_class_t mpls_gre_device_class;
 
 /* Parse mpls protocol as 0xXXXX or protocol name.
    In either host or network byte order. */
index e512df7..690ae4f 100644 (file)
@@ -44,7 +44,7 @@
 #include <vnet/ppp/packet.h>
 #include <vnet/pg/pg.h>
 
-vnet_hw_interface_class_t ppp_hw_interface_class;
+extern vnet_hw_interface_class_t ppp_hw_interface_class;
 
 typedef enum {
 #define ppp_error(n,s) PPP_ERROR_##n,
index ae3f342..23254fb 100644 (file)
@@ -474,7 +474,7 @@ i32x4_get0 (i32x4 x)
 always_inline u32 u8x16_compare_byte_mask (u8x16 x)
 { return _mm_movemask_epi8 ((__m128i) x); }
 
-u8 u32x4_compare_word_mask_table[256];
+extern u8 u32x4_compare_word_mask_table[256];
 
 always_inline u32 u32x4_compare_word_mask (u32x4 x)
 {