FD.io VPP  v18.04-17-g3a0d853
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_if_per_thread_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)   (((a) == 2) || ((a) == 4) || ((a) == 8) || ((a) == 16))
 
#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 }
 

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...
 
vnet_device_class_t bond_dev_class
 
bond_main_t bond_main
 

Macro Definition Documentation

#define BOND_MODULO_SHORTCUT (   a)    (((a) == 2) || ((a) == 4) || ((a) == 8) || ((a) == 16))

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,
  y 
)    (((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 284 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 318 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.

Function Documentation

void bond_create_if ( vlib_main_t vm,
bond_create_if_args_t args 
)

Definition at line 226 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 171 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 575 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 63 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 94 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 47 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 403 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 432 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 418 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 440 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 409 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 66 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 392 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 360 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 377 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 345 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 422 of file node.c.

bond_main_t bond_main

Definition at line 24 of file node.c.