FD.io VPP  v19.08.1-401-g8e4ed521a
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

◆ BOND_MODULO_SHORTCUT

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

Definition at line 34 of file node.h.

◆ foreach_bond_lb

#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.

◆ foreach_bond_lb_algo

#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.

◆ foreach_bond_mode

#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.

◆ LACP_FAST_PERIODIC_TIMER

#define LACP_FAST_PERIODIC_TIMER   1.0

Definition at line 25 of file node.h.

◆ LACP_LONG_TIMOUT_TIME

#define LACP_LONG_TIMOUT_TIME   (LACP_SLOW_PERIODIC_TIMER * 3)

Definition at line 28 of file node.h.

◆ LACP_SHORT_TIMOUT_TIME

#define LACP_SHORT_TIMOUT_TIME   (LACP_FAST_PERIODIC_TIMER * 3)

Definition at line 26 of file node.h.

◆ LACP_SLOW_PERIODIC_TIMER

#define LACP_SLOW_PERIODIC_TIMER   30.0

Definition at line 27 of file node.h.

◆ MIN

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

Definition at line 31 of file node.h.

Typedef Documentation

◆ lacp_enable_disable_func

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

Definition at line 340 of file node.h.

◆ load_balance_func

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 381 of file node.h.

Enumeration Type Documentation

◆ bond_load_balance_t

Enumerator
foreach_bond_lb_algo 

Definition at line 66 of file node.h.

◆ bond_mode_t

Enumerator
foreach_bond_mode 

Definition at line 44 of file node.h.

◆ bond_send_garp_na_process_event_t

Enumerator
BOND_SEND_GARP_NA 

Definition at line 73 of file node.h.

Function Documentation

◆ bond_create_if()

void bond_create_if ( vlib_main_t vm,
bond_create_if_args_t args 
)

Definition at line 339 of file cli.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bond_delete_if()

int bond_delete_if ( vlib_main_t vm,
u32  sw_if_index 
)

Definition at line 298 of file cli.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bond_detach_slave()

void bond_detach_slave ( vlib_main_t vm,
bond_detach_slave_args_t args 
)

Definition at line 769 of file cli.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bond_disable_collecting_distributing()

void bond_disable_collecting_distributing ( vlib_main_t vm,
slave_if_t sif 
)

Definition at line 26 of file cli.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bond_dump_ifs()

int bond_dump_ifs ( bond_interface_details_t **  out_bondids)

Definition at line 175 of file cli.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bond_dump_slave_ifs()

int bond_dump_slave_ifs ( slave_interface_details_t **  out_slaveids,
u32  bond_sw_if_index 
)

Definition at line 210 of file cli.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bond_enable_collecting_distributing()

void bond_enable_collecting_distributing ( vlib_main_t vm,
slave_if_t sif 
)

Definition at line 105 of file cli.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bond_enslave()

void bond_enslave ( vlib_main_t vm,
bond_enslave_args_t args 
)

Definition at line 555 of file cli.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bond_get_master_by_dev_instance()

static bond_if_t* bond_get_master_by_dev_instance ( u32  dev_instance)
inlinestatic

Definition at line 496 of file node.h.

+ Here is the caller graph for this function:

◆ bond_get_master_by_sw_if_index()

static bond_if_t* bond_get_master_by_sw_if_index ( u32  sw_if_index)
inlinestatic

Definition at line 482 of file node.h.

+ Here is the caller graph for this function:

◆ bond_get_slave_by_sw_if_index()

static slave_if_t* bond_get_slave_by_sw_if_index ( u32  sw_if_index)
inlinestatic

Definition at line 504 of file node.h.

+ Here is the caller graph for this function:

◆ bond_register_callback()

static void bond_register_callback ( lacp_enable_disable_func  func)
inlinestatic

Definition at line 473 of file node.h.

+ Here is the caller graph for this function:

◆ CLIB_PACKED()

typedef CLIB_PACKED ( struct { u16 system_priority;u8 system[6];u16 key;u16 port_priority;u16 port_number;u8 state;}  )

◆ format_bond_interface_name()

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:

◆ format_bond_load_balance()

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

Definition at line 456 of file node.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_bond_mode()

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

Definition at line 424 of file node.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unformat_bond_load_balance()

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

Definition at line 441 of file node.h.

+ Here is the caller graph for this function:

◆ unformat_bond_mode()

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

Definition at line 409 of file node.h.

+ Here is the caller graph for this function:

Variable Documentation

◆ bond_dev_class

vnet_device_class_t bond_dev_class

◆ bond_input_node

vlib_node_registration_t bond_input_node

(constructor) VLIB_REGISTER_NODE (bond_input_node)

Definition at line 404 of file node.c.

◆ bond_main

bond_main_t bond_main

Definition at line 25 of file node.c.

◆ bond_process_node

vlib_node_registration_t bond_process_node

(constructor) VLIB_REGISTER_NODE (bond_process_node)

Definition at line 792 of file device.c.