clib_error_t *(*fp) (struct vnet_main_t * vnm, u32 if_index, u32 flags);
} _vnet_interface_function_list_elt_t;
+#ifndef CLIB_MARCH_VARIANT
#define _VNET_INTERFACE_FUNCTION_DECL_PRIO(f,tag,p) \
\
static void __vnet_interface_function_init_##tag##_##f (void) \
next = next->next_interface_function; \
} \
}
+#else
+/* create unused pointer to silence compiler warnings and get whole
+ function optimized out */
+#define _VNET_INTERFACE_FUNCTION_DECL_PRIO(f,tag,p) \
+static __clib_unused void * __clib_unused_##f = f;
+#endif
#define _VNET_INTERFACE_FUNCTION_DECL(f,tag) \
_VNET_INTERFACE_FUNCTION_DECL_PRIO(f,tag,VNET_ITF_FUNC_PRIORITY_LOW)
vnet_interface_set_mac_address_function_t *mac_addr_change_function;
} vnet_device_class_t;
+#ifndef CLIB_MARCH_VARIANT
#define VNET_DEVICE_CLASS(x,...) \
__VA_ARGS__ vnet_device_class_t x; \
static void __vnet_add_device_class_registration_##x (void) \
&x, next_class_registration); \
} \
__VA_ARGS__ vnet_device_class_t x
+#else
+/* create unused pointer to silence compiler warnings and get whole
+ function optimized out */
+#define VNET_DEVICE_CLASS(x,...) \
+static __clib_unused vnet_device_class_t __clib_unused_##x
+#endif
#define VNET_DEVICE_CLASS_TX_FN(devclass) \
uword CLIB_MARCH_SFX (devclass##_tx_fn)(); \