diff options
author | Eyal Bari <ebari@cisco.com> | 2018-02-13 11:50:58 +0200 |
---|---|---|
committer | John Lo <loj@cisco.com> | 2018-02-13 18:45:48 +0000 |
commit | f9cda7d3efd92a642fc146e89dbe58a37a4ddb8d (patch) | |
tree | 67e8c58fea61872941f010f2f13fc92454cfa51a | |
parent | dcbea0b74b3485d3c60edb2bf73ee044a70483f1 (diff) |
vnet:remove duplicate interface function macro
Change-Id: I0ee18df69d5fe833c746d0d1e14aac14338a6e42
Signed-off-by: Eyal Bari <ebari@cisco.com>
-rw-r--r-- | src/vnet/interface.h | 18 |
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) \ |