Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Trivial: Clean up some typos.
[vpp.git]
/
src
/
vnet
/
interface.h
diff --git
a/src/vnet/interface.h
b/src/vnet/interface.h
index
e9adfe8
..
6ca2b0d
100644
(file)
--- a/
src/vnet/interface.h
+++ b/
src/vnet/interface.h
@@
-69,7
+69,8
@@
typedef clib_error_t *(vnet_subif_add_del_function_t)
/* Interface set mac address callback. */
typedef clib_error_t *(vnet_interface_set_mac_address_function_t)
/* Interface set mac address callback. */
typedef clib_error_t *(vnet_interface_set_mac_address_function_t)
- (struct vnet_hw_interface_t * hi, char *address);
+ (struct vnet_hw_interface_t * hi,
+ const u8 * old_address, const u8 * new_address);
/* Interface set rx mode callback. */
typedef clib_error_t *(vnet_interface_set_rx_mode_function_t)
/* Interface set rx mode callback. */
typedef clib_error_t *(vnet_interface_set_rx_mode_function_t)
@@
-89,7
+90,7
@@
typedef enum
VNET_FLOW_DEV_OP_RESET_COUNTER,
} vnet_flow_dev_op_t;
VNET_FLOW_DEV_OP_RESET_COUNTER,
} vnet_flow_dev_op_t;
-/* Interface flow opeations callback. */
+/* Interface flow ope
r
ations callback. */
typedef int (vnet_flow_dev_ops_function_t) (struct vnet_main_t * vnm,
vnet_flow_dev_op_t op,
u32 hw_if_index, u32 index,
typedef int (vnet_flow_dev_ops_function_t) (struct vnet_main_t * vnm,
vnet_flow_dev_op_t op,
u32 hw_if_index, u32 index,
@@
-108,6
+109,7
@@
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;
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) \
#define _VNET_INTERFACE_FUNCTION_DECL_PRIO(f,tag,p) \
\
static void __vnet_interface_function_init_##tag##_##f (void) \
@@
-146,6
+148,12
@@
static void __vnet_interface_function_deinit_##tag##_##f (void) \
next = next->next_interface_function; \
} \
}
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)
#define _VNET_INTERFACE_FUNCTION_DECL(f,tag) \
_VNET_INTERFACE_FUNCTION_DECL_PRIO(f,tag,VNET_ITF_FUNC_PRIORITY_LOW)
@@
-248,6
+256,7
@@
typedef struct _vnet_device_class
vnet_interface_set_mac_address_function_t *mac_addr_change_function;
} vnet_device_class_t;
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) \
#define VNET_DEVICE_CLASS(x,...) \
__VA_ARGS__ vnet_device_class_t x; \
static void __vnet_add_device_class_registration_##x (void) \
@@
-267,6
+276,12
@@
static void __vnet_rm_device_class_registration_##x (void) \
&x, next_class_registration); \
} \
__VA_ARGS__ vnet_device_class_t x
&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)(); \
#define VNET_DEVICE_CLASS_TX_FN(devclass) \
uword CLIB_MARCH_SFX (devclass##_tx_fn)(); \
@@
-414,7
+429,7
@@
typedef struct _vnet_hw_interface_class
u32 sw_if_index,
vnet_link_t link_type, const void *dst_hw_address);
u32 sw_if_index,
vnet_link_t link_type, const void *dst_hw_address);
- /* Update an adjace
cn
y added by FIB (as opposed to via the
+ /* Update an adjace
nc
y added by FIB (as opposed to via the
* neighbour resolution protocol). */
void (*update_adjacency) (struct vnet_main_t * vnm,
u32 sw_if_index, u32 adj_index);
* neighbour resolution protocol). */
void (*update_adjacency) (struct vnet_main_t * vnm,
u32 sw_if_index, u32 adj_index);
@@
-671,7
+686,7
@@
extern vnet_mtu_t vnet_link_to_mtu (vnet_link_t link);
typedef enum vnet_sw_interface_flags_t_
{
typedef enum vnet_sw_interface_flags_t_
{
- /* Interface is "up" meaning adminstratively up.
+ /* Interface is "up" meaning admin
i
stratively up.
Up in the sense of link state being up is maintained by hardware interface. */
VNET_SW_INTERFACE_FLAG_ADMIN_UP = (1 << 0),
Up in the sense of link state being up is maintained by hardware interface. */
VNET_SW_INTERFACE_FLAG_ADMIN_UP = (1 << 0),