From f9cda7d3efd92a642fc146e89dbe58a37a4ddb8d Mon Sep 17 00:00:00 2001 From: Eyal Bari Date: Tue, 13 Feb 2018 11:50:58 +0200 Subject: vnet:remove duplicate interface function macro Change-Id: I0ee18df69d5fe833c746d0d1e14aac14338a6e42 Signed-off-by: Eyal Bari --- src/vnet/interface.h | 18 +++--------------- 1 file 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) \ -- cgit 1.2.3-korg