/* 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)
VNET_FLOW_DEV_OP_RESET_COUNTER,
} vnet_flow_dev_op_t;
-/* Interface flow opeations callback. */
+/* Interface flow operations 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,
u32 sw_if_index,
vnet_link_t link_type, const void *dst_hw_address);
- /* Update an adjacecny added by FIB (as opposed to via the
+ /* Update an adjacency 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);
typedef enum vnet_sw_interface_flags_t_
{
- /* Interface is "up" meaning adminstratively up.
+ /* Interface is "up" meaning administratively up.
Up in the sense of link state being up is maintained by hardware interface. */
VNET_SW_INTERFACE_FLAG_ADMIN_UP = (1 << 0),
vnet_interface_counter_lock (vnet_interface_main_t * im)
{
if (im->sw_if_counter_lock)
- while (__sync_lock_test_and_set (im->sw_if_counter_lock, 1))
+ while (clib_atomic_test_and_set (im->sw_if_counter_lock))
/* zzzz */ ;
}
vnet_interface_counter_unlock (vnet_interface_main_t * im)
{
if (im->sw_if_counter_lock)
- *im->sw_if_counter_lock = 0;
+ clib_atomic_release (im->sw_if_counter_lock);
}
void vnet_pcap_drop_trace_filter_add_del (u32 error_index, int is_add);