summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/interface.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/vnet/interface.h b/src/vnet/interface.h
index 2c2dc670a01..e3fb47ad263 100644
--- a/src/vnet/interface.h
+++ b/src/vnet/interface.h
@@ -89,21 +89,6 @@ typedef struct _vnet_interface_function_list_elt
clib_error_t *(*fp) (struct vnet_main_t * vnm, u32 if_index, u32 flags);
} _vnet_interface_function_list_elt_t;
-#define _VNET_INTERFACE_FUNCTION_DECL(f,tag) \
- \
-static void __vnet_interface_function_init_##tag##_##f (void) \
- __attribute__((__constructor__)) ; \
- \
-static void __vnet_interface_function_init_##tag##_##f (void) \
-{ \
- vnet_main_t * vnm = vnet_get_main(); \
- static _vnet_interface_function_list_elt_t init_function; \
- init_function.next_interface_function = \
- vnm->tag##_functions[VNET_ITF_FUNC_PRIORITY_LOW]; \
- vnm->tag##_functions[VNET_ITF_FUNC_PRIORITY_LOW] = &init_function; \
- init_function.fp = (void *) &f; \
-}
-
#define _VNET_INTERFACE_FUNCTION_DECL_PRIO(f,tag,p) \
\
static void __vnet_interface_function_init_##tag##_##f (void) \
@@ -118,6 +103,9 @@ static void __vnet_interface_function_init_##tag##_##f (void) \
init_function.fp = (void *) &f; \
}
+#define _VNET_INTERFACE_FUNCTION_DECL(f,tag) \
+ _VNET_INTERFACE_FUNCTION_DECL_PRIO(f,tag,VNET_ITF_FUNC_PRIORITY_LOW)
+
#define VNET_HW_INTERFACE_ADD_DEL_FUNCTION(f) \
_VNET_INTERFACE_FUNCTION_DECL(f,hw_interface_add_del)
#define VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION(f) \