session: avoid session handle conflict with vcl
[vpp.git] / src / vnet / interface.h
index 5ca489d..e3fb47a 100644 (file)
@@ -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)             \
@@ -444,6 +432,10 @@ typedef struct vnet_hw_interface_t
   /* Software index for this hardware interface. */
   u32 sw_if_index;
 
+  /* Next index in interface-output node for this interface
+     used by node function vnet_per_buffer_interface_output() */
+  u32 output_node_next_index;
+
   /* Maximum transmit rate for this interface in bits/sec. */
   f64 max_rate_bits_per_sec;