|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
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)
f64 last_lacpdu_sent_time
uword * member_by_sw_if_index
int bond_dump_member_ifs(member_interface_details_t **out_memberids, u32 bond_sw_if_index)
struct _vnet_device_class vnet_device_class_t
static uword unformat_bond_mode(unformat_input_t *input, va_list *args)
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)
load_balance_func load_balance
void bond_disable_collecting_distributing(vlib_main_t *vm, member_if_t *mif)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
bond_per_port_queue_t * per_port_queue
vlib_main_t vlib_node_runtime_t * node
lacp_enable_disable_func lacp_enable_disable
uword last_packet_signature
f64 last_marker_pdu_recd_time
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static bond_if_t * bond_get_bond_if_by_sw_if_index(u32 sw_if_index)
vl_api_dhcp_client_state_t state
static void bond_register_callback(lacp_enable_disable_func func)
member interface details struct
f64 last_lacpdu_recd_time
vnet_hw_if_output_node_runtime_t * r
u8 last_packet_signature_valid
void bond_create_if(vlib_main_t *vm, bond_create_if_args_t *args)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
int bond_delete_if(vlib_main_t *vm, u32 sw_if_index)
static uword unformat_bond_load_balance(unformat_input_t *input, va_list *args)
uword * port_number_bitmap
ethernet_header_t ethernet
vlib_node_registration_t bond_input_node
(constructor) VLIB_REGISTER_NODE (bond_input_node)
vnet_device_class_t bond_dev_class
void bond_enable_collecting_distributing(vlib_main_t *vm, member_if_t *mif)
lacp_port_info_t actor_admin
void bond_detach_member(vlib_main_t *vm, bond_detach_member_args_t *args)
struct _vlib_node_registration vlib_node_registration_t
typedef CLIB_PACKED(struct { u16 system_priority;u8 system[6];u16 key;u16 port_priority;u16 port_number;u8 state;}) lacp_port_info_t
u64 marker_bad_pdu_received
void(* lacp_enable_disable_func)(vlib_main_t *vm, bond_if_t *bif, member_if_t *mif, u8 enable)
description fragment has unexpected format
#define foreach_bond_lb_algo
uword * bond_by_sw_if_index
static member_if_t * bond_get_member_by_sw_if_index(u32 sw_if_index)
u8 * format_bond_interface_name(u8 *s, va_list *args)
bond_send_garp_na_process_event_t
int bond_dump_ifs(bond_interface_details_t **out_bondids)
lacp_port_info_t partner_admin
f64 last_marker_pdu_sent_time
static u8 * format_bond_load_balance(u8 *s, va_list *args)
BOND interface details struct.
bond_per_thread_data_t * per_thread_data
#define foreach_bond_mode
static u8 * format_bond_mode(u8 *s, va_list *args)
vl_api_interface_index_t sw_if_index
u32(* load_balance_func)(vlib_main_t *vm, vlib_node_runtime_t *node, bond_if_t *bif, vlib_buffer_t *b0, uword member_count)
vlib_node_registration_t bond_process_node
(constructor) VLIB_REGISTER_NODE (bond_process_node)
VLIB buffer representation.