FD.io VPP  v19.04.1-1-ge4a0f9f
Vector Packet Processing
node.h File Reference
+ Include dependency graph for node.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bond_create_if_args_t
 
struct  bond_enslave_args_t
 
struct  bond_detach_slave_args_t
 
struct  bond_interface_details_t
 BOND interface details struct. More...
 
struct  slave_interface_details_t
 slave interface details struct More...
 
struct  bond_per_port_queue_t
 
struct  bond_per_thread_data_t
 
struct  bond_if_t
 
struct  slave_if_t
 
struct  bond_main_t
 
struct  bond_packet_trace_t
 
struct  bond_load_balance_func_t
 

Macros

#define LACP_FAST_PERIODIC_TIMER   1.0
 
#define LACP_SHORT_TIMOUT_TIME   (LACP_FAST_PERIODIC_TIMER * 3)
 
#define LACP_SLOW_PERIODIC_TIMER   30.0
 
#define LACP_LONG_TIMOUT_TIME   (LACP_SLOW_PERIODIC_TIMER * 3)
 
#define MIN(x, y)   (((x)<(y))?(x):(y))
 
#define BOND_MODULO_SHORTCUT(a)   (is_pow2 (a))
 
#define foreach_bond_mode
 
#define foreach_bond_lb
 
#define foreach_bond_lb_algo
 

Typedefs

typedef void(* lacp_enable_disable_func) (vlib_main_t *vm, bond_if_t *bif, slave_if_t *sif, u8 enable)
 
typedef u32(* load_balance_func) (vlib_main_t *vm, vlib_node_runtime_t *node, bond_if_t *bif, vlib_buffer_t *b0, uword slave_count)
 

Enumerations

enum  bond_mode_t { foreach_bond_mode }
 
enum  bond_load_balance_t { foreach_bond_lb_algo }
 
enum  bond_send_garp_na_process_event_t { BOND_SEND_GARP_NA = 1 }
 

Functions

typedef CLIB_PACKED (struct{u16 system_priority;u8 system[6];u16 key;u16 port_priority;u16 port_number;u8 state;}) lacp_port_info_t
 
void bond_disable_collecting_distributing (vlib_main_t *vm, slave_if_t *sif)
 
void bond_enable_collecting_distributing (vlib_main_t *vm, slave_if_t *sif)
 
u8format_bond_interface_name (u8 *s, va_list *args)
 
void bond_create_if (vlib_main_t *vm, bond_create_if_args_t *args)
 
int bond_delete_if (vlib_main_t *vm, u32 sw_if_index)
 
void bond_enslave (vlib_main_t *vm, bond_enslave_args_t *args)
 
void bond_detach_slave (vlib_main_t *vm, bond_detach_slave_args_t *args)
 
int bond_dump_ifs (bond_interface_details_t **out_bondids)
 
int bond_dump_slave_ifs (slave_interface_details_t **out_slaveids, u32 bond_sw_if_index)
 
static uword unformat_bond_mode (unformat_input_t *input, va_list *args)
 
static u8format_bond_mode (u8 *s, va_list *args)
 
static uword unformat_bond_load_balance (unformat_input_t *input, va_list *args)
 
static u8format_bond_load_balance (u8 *s, va_list *args)
 
static void bond_register_callback (lacp_enable_disable_func func)
 
static bond_if_tbond_get_master_by_sw_if_index (u32 sw_if_index)
 
static bond_if_tbond_get_master_by_dev_instance (u32 dev_instance)
 
static slave_if_tbond_get_slave_by_sw_if_index (u32 sw_if_index)
 

Variables

vlib_node_registration_t bond_input_node
 (constructor) VLIB_REGISTER_NODE (bond_input_node) More...
 
vlib_node_registration_t bond_process_node
 (constructor) VLIB_REGISTER_NODE (bond_process_node) More...
 
vnet_device_class_t bond_dev_class
 
bond_main_t bond_main
 

Macro Definition Documentation

#define BOND_MODULO_SHORTCUT (   a)    (is_pow2 (a))

Definition at line 34 of file node.h.

#define foreach_bond_lb
Value:
_ (2, L23, "l23", l23) \
_ (1, L34 , "l34", l34) \
_ (0, L2, "l2", l2)

Definition at line 52 of file node.h.

#define foreach_bond_lb_algo
Value:
_ (0, L2, "l2", l2) \
_ (1, L34 , "l34", l34) \
_ (2, L23, "l23", l23) \
_ (3, RR, "round-robin", round_robin) \
_ (4, BC, "broadcast", broadcast) \
_ (5, AB, "active-backup", active_backup)

Definition at line 58 of file node.h.

#define foreach_bond_mode
Value:
_ (1, ROUND_ROBIN, "round-robin") \
_ (2, ACTIVE_BACKUP, "active-backup") \
_ (3, XOR, "xor") \
_ (4, BROADCAST, "broadcast") \
_ (5, LACP, "lacp")

Definition at line 37 of file node.h.

#define LACP_FAST_PERIODIC_TIMER   1.0

Definition at line 25 of file node.h.

#define LACP_LONG_TIMOUT_TIME   (LACP_SLOW_PERIODIC_TIMER * 3)

Definition at line 28 of file node.h.

#define LACP_SHORT_TIMOUT_TIME   (LACP_FAST_PERIODIC_TIMER * 3)

Definition at line 26 of file node.h.

#define LACP_SLOW_PERIODIC_TIMER   30.0

Definition at line 27 of file node.h.

#define MIN (   x,
 
)    (((x)<(y))?(x):(y))

Definition at line 31 of file node.h.

Typedef Documentation

typedef void(* lacp_enable_disable_func) (vlib_main_t *vm, bond_if_t *bif, slave_if_t *sif, u8 enable)

Definition at line 326 of file node.h.

typedef u32(* load_balance_func) (vlib_main_t *vm, vlib_node_runtime_t *node, bond_if_t *bif, vlib_buffer_t *b0, uword slave_count)

Definition at line 365 of file node.h.

Enumeration Type Documentation

Enumerator
foreach_bond_lb_algo 

Definition at line 66 of file node.h.

Enumerator
foreach_bond_mode 

Definition at line 44 of file node.h.

Enumerator
BOND_SEND_GARP_NA 

Definition at line 73 of file node.h.

Function Documentation

void bond_create_if ( vlib_main_t vm,
bond_create_if_args_t args 
)

Definition at line 243 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int bond_delete_if ( vlib_main_t vm,
u32  sw_if_index 
)

Definition at line 194 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bond_detach_slave ( vlib_main_t vm,
bond_detach_slave_args_t args 
)

Definition at line 625 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bond_disable_collecting_distributing ( vlib_main_t vm,
slave_if_t sif 
)

Definition at line 25 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int bond_dump_ifs ( bond_interface_details_t **  out_bondids)

Definition at line 82 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int bond_dump_slave_ifs ( slave_interface_details_t **  out_slaveids,
u32  bond_sw_if_index 
)

Definition at line 114 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bond_enable_collecting_distributing ( vlib_main_t vm,
slave_if_t sif 
)

Definition at line 59 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void bond_enslave ( vlib_main_t vm,
bond_enslave_args_t args 
)

Definition at line 436 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bond_if_t* bond_get_master_by_dev_instance ( u32  dev_instance)
inlinestatic

Definition at line 480 of file node.h.

+ Here is the caller graph for this function:

static bond_if_t* bond_get_master_by_sw_if_index ( u32  sw_if_index)
inlinestatic

Definition at line 466 of file node.h.

+ Here is the caller graph for this function:

static slave_if_t* bond_get_slave_by_sw_if_index ( u32  sw_if_index)
inlinestatic

Definition at line 488 of file node.h.

+ Here is the caller graph for this function:

static void bond_register_callback ( lacp_enable_disable_func  func)
inlinestatic

Definition at line 457 of file node.h.

+ Here is the caller graph for this function:

typedef CLIB_PACKED ( struct{u16 system_priority;u8 system[6];u16 key;u16 port_priority;u16 port_number;u8 state;}  )
u8* format_bond_interface_name ( u8 s,
va_list *  args 
)

Definition at line 69 of file device.c.

+ Here is the call graph for this function:

static u8* format_bond_load_balance ( u8 s,
va_list *  args 
)
inlinestatic

Definition at line 440 of file node.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_bond_mode ( u8 s,
va_list *  args 
)
inlinestatic

Definition at line 408 of file node.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword unformat_bond_load_balance ( unformat_input_t input,
va_list *  args 
)
inlinestatic

Definition at line 425 of file node.h.

+ Here is the caller graph for this function:

static uword unformat_bond_mode ( unformat_input_t input,
va_list *  args 
)
inlinestatic

Definition at line 393 of file node.h.

+ Here is the caller graph for this function:

Variable Documentation

vnet_device_class_t bond_dev_class
vlib_node_registration_t bond_input_node

(constructor) VLIB_REGISTER_NODE (bond_input_node)

Definition at line 365 of file node.c.

bond_main_t bond_main

Definition at line 25 of file node.c.

vlib_node_registration_t bond_process_node

(constructor) VLIB_REGISTER_NODE (bond_process_node)

Definition at line 801 of file device.c.