set(l ${lib}_${VARIANT})
add_library(${l} OBJECT ${ARGN})
set_target_properties(${l} PROPERTIES POSITION_INDEPENDENT_CODE ON)
- target_compile_options(${l} PUBLIC "-DCLIB_MARCH_VARIANT=${VARIANT}")
+ target_compile_options(${l} PUBLIC "-DCLIB_MARCH_VARIANT=${VARIANT}" -Wall -fno-common)
separate_arguments(VARIANT_FLAGS)
target_compile_options(${l} PUBLIC ${VARIANT_FLAGS})
target_sources(${lib} PRIVATE $<TARGET_OBJECTS:${l}>)
)
add_library(${lib} SHARED ${ARG_SOURCES})
- target_compile_options(${lib} PRIVATE -Wall)
+ target_compile_options(${lib} PRIVATE -Wall -fno-common)
if(VPP_LIB_VERSION)
set_target_properties(${lib} PROPERTIES SOVERSION ${VPP_LIB_VERSION})
endif()
} acl_fa_next_t;
-enum
+typedef enum
{
ACL_FA_CLEANER_RESCHEDULE = 1,
ACL_FA_CLEANER_DELETE_BY_SW_IF_INDEX,
#define AVF_RX_VECTOR_SZ VLIB_FRAME_SIZE
-enum
+typedef enum
{
AVF_PROCESS_EVENT_START = 1,
AVF_PROCESS_EVENT_STOP = 2,
extern vnet_device_class_t memif_device_class;
extern vlib_node_registration_t memif_input_node;
-enum
+typedef enum
{
MEMIF_PROCESS_EVENT_START = 1,
MEMIF_PROCESS_EVENT_STOP = 2,
u32 flags;
} vcl_session_msg_t;
-enum
+typedef enum
{
VCL_SESS_ATTR_SERVER,
VCL_SESS_ATTR_CUT_THRU,
u8 data[400];
} bfd_input_trace_t;
-enum
+typedef enum
{
BFD_EVENT_RESCHEDULE = 1,
BFD_EVENT_NEW_SESSION,
/*
* provided for fast data-path access
*/
-bier_fmask_t *bier_fmask_pool;
+extern bier_fmask_t *bier_fmask_pool;
static inline bier_fmask_t *
bier_fmask_get (u32 index)
#include <vnet/snap/snap.h>
#include <vnet/bonding/node.h>
+#ifndef CLIB_MARCH_VARIANT
bond_main_t bond_main;
+#endif /* CLIB_MARCH_VARIANT */
#define foreach_bond_input_error \
_(NONE, "no error") \
#undef _
} bond_load_balance_t;
-enum
+typedef enum
{
BOND_SEND_GARP_NA = 1,
} bond_send_garp_na_process_event_t;
#undef vl_printfun
#include <vlibapi/api_helper_macros.h>
-vpe_api_main_t vpe_api_main;
+extern vpe_api_main_t vpe_api_main;
#define foreach_vpe_api_msg \
_(PIPE_CREATE, pipe_create) \
*/
#define VHOST_USER_RX_COPY_THRESHOLD 64
-vlib_node_registration_t vhost_user_input_node;
+extern vlib_node_registration_t vhost_user_input_node;
#define foreach_vhost_user_input_func_error \
_(NO_ERROR, "no error") \
*/
#define VHOST_USER_TX_COPY_THRESHOLD (VHOST_USER_COPY_ARRAY_N - 40)
-vnet_device_class_t vhost_user_device_class;
+extern vnet_device_class_t vhost_user_device_class;
#define foreach_vhost_user_tx_func_error \
_(NONE, "no error") \
#include <vnet/ip/ip.h>
#include <vnet/ethernet/ethernet.h>
+dvr_dpo_t *dvr_dpo_pool;
+
/**
* The 'DB' of DVR DPOs.
* There is one per-interface per-L3 proto, so this is a per-interface vector
/**
* @brief pool of all interface DPOs
*/
-dvr_dpo_t *dvr_dpo_pool;
+extern dvr_dpo_t *dvr_dpo_pool;
static inline dvr_dpo_t *
dvr_dpo_get (index_t index)
#include <vnet/fib/fib_node.h>
#include <vnet/l2/l2_input.h>
+interface_rx_dpo_t *interface_rx_dpo_pool;
+
/*
* The 'DB' of interface DPOs.
* There is only one per-interface per-protocol, so this is a per-interface
/**
* @brief pool of all interface DPOs
*/
-interface_rx_dpo_t *interface_rx_dpo_pool;
+extern interface_rx_dpo_t *interface_rx_dpo_pool;
static inline interface_rx_dpo_t *
interface_rx_dpo_get (index_t index)
/**
* @brief pool of all l3_proxy DPOs
*/
-l3_proxy_dpo_t *l3_proxy_dpo_pool;
+extern l3_proxy_dpo_t *l3_proxy_dpo_pool;
static inline l3_proxy_dpo_t *
l3_proxy_dpo_get (index_t index)
/**
* @brief pool of all receive DPOs
*/
-receive_dpo_t *receive_dpo_pool;
+extern receive_dpo_t *receive_dpo_pool;
static inline receive_dpo_t *
receive_dpo_get (index_t index)
VNET_SW_INTERFACE_ADD_DEL_FUNCTION (ip4_sw_interface_add_del);
/* Global IP4 main. */
+#ifndef CLIB_MARCH_VARIANT
ip4_main_t ip4_main;
+#endif /* CLIB_MARCH_VARIANT */
static clib_error_t *
ip4_lookup_init (vlib_main_t * vm)
/*
* Hop-by-Hop handling
*/
+#ifndef CLIB_MARCH_VARIANT
ip6_hop_by_hop_main_t ip6_hop_by_hop_main;
+#endif /* CLIB_MARCH_VARIANT */
#define foreach_ip6_hop_by_hop_error \
_(PROCESSED, "pkts with ip6 hop-by-hop options") \
u8 option_data[256];
} ip6_hop_by_hop_trace_t;
-vlib_node_registration_t ip6_hop_by_hop_node;
+extern vlib_node_registration_t ip6_hop_by_hop_node;
static char *ip6_hop_by_hop_error_strings[] = {
#define _(sym,string) string,
#include <vnet/ipsec/ipsec.h>
#include <vnet/ipsec/esp.h>
+#ifndef CLIB_MARCH_VARIANT
ipsec_proto_main_t ipsec_proto_main;
+#endif /* CLIB_MARCH_VARIANT */
#define foreach_esp_encrypt_next \
_(DROP, "error-drop") \
extern vlib_node_registration_t l2fib_mac_age_scanner_process_node;
-enum
+typedef enum
{
L2_MAC_AGE_PROCESS_EVENT_START = 1,
L2_MAC_AGE_PROCESS_EVENT_STOP = 2,
return s;
}
-l2_patch_main_t l2_patch_main;
+static l2_patch_main_t l2_patch_main;
static vlib_node_registration_t l2_patch_node;
u8 data[400];
} lldp_input_trace_t;
-enum
+typedef enum
{
LLDP_EVENT_RESCHEDULE = 1,
} lldp_process_event_t;
/**
* The arc/edge from the MPLS lookup node to the MPLS replicate node
*/
-u32 mpls_lookup_to_replicate_edge;
+extern u32 mpls_lookup_to_replicate_edge;
/**
* Enum of statically configred MPLS lookup next nodes
void session_lookup_dump_local_rules_table (u32 fib_index, u8 fib_proto,
u8 transport_proto);
-enum _session_rule_scope
+typedef enum _session_rule_scope
{
SESSION_RULE_SCOPE_GLOBAL = 1,
SESSION_RULE_SCOPE_LOCAL = 2,