15 #ifndef __included_vnet_bonding_node_h__ 16 #define __included_vnet_bonding_node_h__ 25 #define LACP_FAST_PERIODIC_TIMER 1.0 26 #define LACP_SHORT_TIMOUT_TIME (LACP_FAST_PERIODIC_TIMER * 3) 27 #define LACP_SLOW_PERIODIC_TIMER 30.0 28 #define LACP_LONG_TIMOUT_TIME (LACP_SLOW_PERIODIC_TIMER * 3) 31 #define MIN(x,y) (((x)<(y))?(x):(y)) 34 #define BOND_MODULO_SHORTCUT(a) \ 37 #define foreach_bond_mode \ 38 _ (1, ROUND_ROBIN, "round-robin") \ 39 _ (2, ACTIVE_BACKUP, "active-backup") \ 41 _ (4, BROADCAST, "broadcast") \ 46 #define _(v, f, s) BOND_MODE_##f = v, 52 #define foreach_bond_lb \ 53 _ (2, L23, "l23", l23) \ 54 _ (1, L34 , "l34", l34) \ 58 #define foreach_bond_lb_algo \ 60 _ (1, L34 , "l34", l34) \ 61 _ (2, L23, "l23", l23) \ 62 _ (3, RR, "round-robin", round_robin) \ 63 _ (4, BC, "broadcast", broadcast) \ 64 _ (5, AB, "active-backup", active_backup) 68 #define _(v, f, s, p) BOND_LB_##f = v, 128 u8 interface_name[64];
140 u8 interface_name[64];
215 u8 persistent_hw_address[6];
258 lacp_port_info_t actor;
427 u32 bond_sw_if_index);
432 u8 *r = va_arg (*args,
u8 *);
435 #define _(v, f, s) else if (unformat (input, s)) *r = BOND_MODE_##f; 452 #define _(v, f, s) case BOND_MODE_##f: t = (u8 *) s; break; 456 return format (s,
"unknown");
458 return format (s,
"%s", t);
464 u8 *r = va_arg (*args,
u8 *);
467 #define _(v, f, s, p) else if (unformat (input, s)) *r = BOND_LB_##f; 484 #define _(v, f, s, p) case BOND_LB_##f: t = (u8 *) s; break; 488 return format (s,
"unknown");
490 return format (s,
"%s", t);
void bond_set_intf_weight(vlib_main_t *vm, bond_set_intf_weight_args_t *args)
static uword unformat_bond_mode(unformat_input_t *input, va_list *args)
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
u64 marker_bad_pdu_received
int bond_dump_member_ifs(member_interface_details_t **out_memberids, u32 bond_sw_if_index)
member interface details struct
void bond_add_member(vlib_main_t *vm, bond_add_member_args_t *args)
static bond_if_t * bond_get_bond_if_by_dev_instance(u32 dev_instance)
static bond_if_t * bond_get_bond_if_by_sw_if_index(u32 sw_if_index)
void bond_disable_collecting_distributing(vlib_main_t *vm, member_if_t *mif)
lacp_enable_disable_func lacp_enable_disable
lacp_port_info_t partner_admin
struct _vnet_device_class vnet_device_class_t
bond_per_thread_data_t * per_thread_data
static void bond_register_callback(lacp_enable_disable_func func)
f64 last_lacpdu_recd_time
void bond_create_if(vlib_main_t *vm, bond_create_if_args_t *args)
vnet_device_class_t bond_dev_class
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
int bond_delete_if(vlib_main_t *vm, u32 sw_if_index)
void bond_enable_collecting_distributing(vlib_main_t *vm, member_if_t *mif)
static uword unformat_bond_load_balance(unformat_input_t *input, va_list *args)
uword * member_by_sw_if_index
f64 last_lacpdu_sent_time
u8 last_packet_signature_valid
vlib_node_registration_t bond_input_node
(constructor) VLIB_REGISTER_NODE (bond_input_node)
void bond_detach_member(vlib_main_t *vm, bond_detach_member_args_t *args)
sll srl srl sll sra u16x4 i
uword * bond_by_sw_if_index
ethernet_header_t ethernet
uword last_packet_signature
void(* lacp_enable_disable_func)(vlib_main_t *vm, bond_if_t *bif, member_if_t *mif, u8 enable)
f64 last_marker_pdu_sent_time
BOND interface details struct.
#define foreach_bond_lb_algo
vlib_main_t vlib_node_runtime_t * node
typedef CLIB_PACKED(struct { u16 system_priority;u8 system[6];u16 key;u16 port_priority;u16 port_number;u8 state;}) lacp_port_info_t
static member_if_t * bond_get_member_by_sw_if_index(u32 sw_if_index)
bond_send_garp_na_process_event_t
int bond_dump_ifs(bond_interface_details_t **out_bondids)
struct _vlib_node_registration vlib_node_registration_t
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
u8 * format_bond_interface_name(u8 *s, va_list *args)
lacp_port_info_t actor_admin
VLIB buffer representation.
uword * port_number_bitmap
static u8 * format_bond_mode(u8 *s, va_list *args)
#define foreach_bond_mode
vl_api_dhcp_client_state_t state
u32(* load_balance_func)(vlib_main_t *vm, vlib_node_runtime_t *node, bond_if_t *bif, vlib_buffer_t *b0, uword member_count)
f64 last_marker_pdu_recd_time
static u8 * format_bond_load_balance(u8 *s, va_list *args)
vlib_node_registration_t bond_process_node
(constructor) VLIB_REGISTER_NODE (bond_process_node)
load_balance_func load_balance
vl_api_interface_index_t sw_if_index
bond_per_port_queue_t * per_port_queue