FD.io VPP  v20.01-rc1
Vector Packet Processing
ila.c File Reference
+ Include dependency graph for ila.c:

Go to the source code of this file.

Data Structures

struct  ila_ila2sir_trace_t
 
struct  ila_sir2ila_trace_t
 

Macros

#define ILA_TABLE_DEFAULT_HASH_NUM_BUCKETS   (64 * 1024)
 
#define ILA_TABLE_DEFAULT_HASH_MEMORY_SIZE   (32<<20)
 
#define foreach_ila_error   _(NONE, "valid ILA packets")
 

Enumerations

enum  ila_error_t { ILA_N_ERROR, STN_IP_PUNT_N_ERROR }
 
enum  ila_ila2sir_next_t { ILA_ILA2SIR_NEXT_DROP, ILA_ILA2SIR_N_NEXT }
 
enum  ila_sir2ila_next_t { ILA_SIR2ILA_NEXT_DROP, ILA_SIR2ILA_N_NEXT }
 INDENT-ON More...
 

Functions

u8format_half_ip6_address (u8 *s, va_list *va)
 
u8format_ila_direction (u8 *s, va_list *args)
 
static u8format_csum_mode (u8 *s, va_list *va)
 
u8format_ila_type (u8 *s, va_list *args)
 
static u8format_ila_entry (u8 *s, va_list *va)
 
u8format_ila_ila2sir_trace (u8 *s, va_list *args)
 
static uword unformat_ila_direction (unformat_input_t *input, va_list *args)
 
static uword unformat_ila_type (unformat_input_t *input, va_list *args)
 
static uword unformat_ila_csum_mode (unformat_input_t *input, va_list *args)
 
static uword unformat_half_ip6_address (unformat_input_t *input, va_list *args)
 
static uword ila_ila2sir (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
u8format_ila_sir2ila_trace (u8 *s, va_list *args)
 
static uword ila_sir2ila (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (ila_sir2ila, static)
 INDENT-ON More...
 
static void ila_entry_stack (ila_entry_t *ie)
 INDENT-ON More...
 
int ila_add_del_entry (ila_add_del_entry_args_t *args)
 
int ila_interface (u32 sw_if_index, u8 disable)
 
 VLIB_PLUGIN_REGISTER ()
 
u8format_ila_dpo (u8 *s, va_list *va)
 
static void ila_dpo_lock (dpo_id_t *dpo)
 no-op lock function. More...
 
static void ila_dpo_unlock (dpo_id_t *dpo)
 no-op unlock function. More...
 
static fib_node_tila_fib_node_get_node (fib_node_index_t index)
 
static void ila_fib_node_last_lock_gone (fib_node_t *node)
 no-op unlock function. More...
 
static ila_entry_tila_entry_from_fib_node (fib_node_t *node)
 
static fib_node_back_walk_rc_t ila_fib_node_back_walk_notify (fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
 Callback function invoked when the forwarding changes for the ILA next-hop. More...
 
clib_error_tila_init (vlib_main_t *vm)
 
static clib_error_tila_entry_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tila_interface_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tila_show_entries_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static ila_main_t ila_main
 
static char * ila_error_strings []
 
static ila_entry_t ila_sir2ila_default_entry
 
static dpo_type_t ila_dpo_type
 Dynamically registered DPO Type for ILA. More...
 
static fib_node_type_t ila_fib_node_type
 Dynamically registered FIB node type for ILA. More...
 
static fib_source_t ila_fib_src
 FIB source for adding entries. More...
 
static vlib_node_registration_t ila_ila2sir_node
 INDENT-OFF More...
 
static vlib_node_registration_t ila_sir2ila_node
 INDENT-OFF More...
 
static const dpo_vft_t ila_vft
 
static const char *const ila_ip6_nodes []
 
static const char *const *const ila_nodes [DPO_PROTO_NUM]
 
static const fib_node_vft_t ila_fib_node_vft
 
static vlib_cli_command_t ila_entry_command
 (constructor) VLIB_CLI_COMMAND (ila_entry_command) More...
 
static vlib_cli_command_t ila_interface_command
 (constructor) VLIB_CLI_COMMAND (ila_interface_command) More...
 
static vlib_cli_command_t ila_show_entries_command
 (constructor) VLIB_CLI_COMMAND (ila_show_entries_command) More...
 

Macro Definition Documentation

◆ foreach_ila_error

#define foreach_ila_error   _(NONE, "valid ILA packets")

Definition at line 28 of file ila.c.

◆ ILA_TABLE_DEFAULT_HASH_MEMORY_SIZE

#define ILA_TABLE_DEFAULT_HASH_MEMORY_SIZE   (32<<20)

Definition at line 26 of file ila.c.

◆ ILA_TABLE_DEFAULT_HASH_NUM_BUCKETS

#define ILA_TABLE_DEFAULT_HASH_NUM_BUCKETS   (64 * 1024)

Definition at line 25 of file ila.c.

Enumeration Type Documentation

◆ ila_error_t

Enumerator
ILA_N_ERROR 
STN_IP_PUNT_N_ERROR 

Definition at line 31 of file ila.c.

◆ ila_ila2sir_next_t

Enumerator
ILA_ILA2SIR_NEXT_DROP 
ILA_ILA2SIR_N_NEXT 

Definition at line 44 of file ila.c.

◆ ila_sir2ila_next_t

INDENT-ON

Enumerator
ILA_SIR2ILA_NEXT_DROP 
ILA_SIR2ILA_N_NEXT 

Definition at line 405 of file ila.c.

Function Documentation

◆ format_csum_mode()

static u8* format_csum_mode ( u8 s,
va_list *  va 
)
static

Definition at line 99 of file ila.c.

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

◆ format_half_ip6_address()

u8* format_half_ip6_address ( u8 s,
va_list *  va 
)

Definition at line 77 of file ila.c.

+ Here is the call graph for this function:

◆ format_ila_direction()

u8* format_ila_direction ( u8 s,
va_list *  args 
)

Definition at line 87 of file ila.c.

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

◆ format_ila_dpo()

u8* format_ila_dpo ( u8 s,
va_list *  va 
)

Definition at line 836 of file ila.c.

+ Here is the call graph for this function:

◆ format_ila_entry()

static u8* format_ila_entry ( u8 s,
va_list *  va 
)
static

Definition at line 132 of file ila.c.

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

◆ format_ila_ila2sir_trace()

u8* format_ila_ila2sir_trace ( u8 s,
va_list *  args 
)

Definition at line 170 of file ila.c.

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

◆ format_ila_sir2ila_trace()

u8* format_ila_sir2ila_trace ( u8 s,
va_list *  args 
)

Definition at line 418 of file ila.c.

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

◆ format_ila_type()

u8* format_ila_type ( u8 s,
va_list *  args 
)

Definition at line 120 of file ila.c.

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

◆ ila_add_del_entry()

int ila_add_del_entry ( ila_add_del_entry_args_t args)

Definition at line 627 of file ila.c.

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

◆ ila_dpo_lock()

static void ila_dpo_lock ( dpo_id_t dpo)
static

no-op lock function.

The lifetime of the ILA entry is managed by the control plane

Definition at line 852 of file ila.c.

◆ ila_dpo_unlock()

static void ila_dpo_unlock ( dpo_id_t dpo)
static

no-op unlock function.

The lifetime of the ILA entry is managed by the control plane

Definition at line 861 of file ila.c.

◆ ila_entry_command_fn()

static clib_error_t* ila_entry_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 952 of file ila.c.

+ Here is the call graph for this function:

◆ ila_entry_from_fib_node()

static ila_entry_t* ila_entry_from_fib_node ( fib_node_t node)
static

Definition at line 899 of file ila.c.

+ Here is the caller graph for this function:

◆ ila_entry_stack()

static void ila_entry_stack ( ila_entry_t ie)
static

INDENT-ON

Definition at line 614 of file ila.c.

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

◆ ila_fib_node_back_walk_notify()

static fib_node_back_walk_rc_t ila_fib_node_back_walk_notify ( fib_node_t node,
fib_node_back_walk_ctx_t ctx 
)
static

Callback function invoked when the forwarding changes for the ILA next-hop.

Definition at line 910 of file ila.c.

+ Here is the call graph for this function:

◆ ila_fib_node_get_node()

static fib_node_t* ila_fib_node_get_node ( fib_node_index_t  index)
static

Definition at line 881 of file ila.c.

◆ ila_fib_node_last_lock_gone()

static void ila_fib_node_last_lock_gone ( fib_node_t node)
static

no-op unlock function.

The lifetime of the ILA entry is managed by the control plane

Definition at line 894 of file ila.c.

◆ ila_ila2sir()

static uword ila_ila2sir ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 257 of file ila.c.

+ Here is the call graph for this function:

◆ ila_init()

clib_error_t* ila_init ( vlib_main_t vm)

Definition at line 928 of file ila.c.

+ Here is the call graph for this function:

◆ ila_interface()

int ila_interface ( u32  sw_if_index,
u8  disable 
)

Definition at line 822 of file ila.c.

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

◆ ila_interface_command_fn()

static clib_error_t* ila_interface_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1032 of file ila.c.

+ Here is the call graph for this function:

◆ ila_show_entries_command_fn()

static clib_error_t* ila_show_entries_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1064 of file ila.c.

+ Here is the call graph for this function:

◆ ila_sir2ila()

static uword ila_sir2ila ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 431 of file ila.c.

+ Here is the call graph for this function:

◆ unformat_half_ip6_address()

static uword unformat_half_ip6_address ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 236 of file ila.c.

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

◆ unformat_ila_csum_mode()

static uword unformat_ila_csum_mode ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 214 of file ila.c.

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

◆ unformat_ila_direction()

static uword unformat_ila_direction ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 182 of file ila.c.

+ Here is the caller graph for this function:

◆ unformat_ila_type()

static uword unformat_ila_type ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 198 of file ila.c.

+ Here is the caller graph for this function:

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )
+ Here is the caller graph for this function:

◆ VNET_FEATURE_INIT()

VNET_FEATURE_INIT ( ila_sir2ila  ,
static   
)

INDENT-ON

INDENT-OFF

+ Here is the caller graph for this function:

Variable Documentation

◆ ila_dpo_type

dpo_type_t ila_dpo_type
static

Dynamically registered DPO Type for ILA.

Definition at line 64 of file ila.c.

◆ ila_entry_command

vlib_cli_command_t ila_entry_command
static
Initial value:
=
{
.path = "ila entry",
.short_help = "ila entry [type <type>] [sir-address <address>] [locator <locator>] [vnid <hex-vnid>]"
" [adj-index <adj-index>] [next-hop <next-hop>] [direction (bidir|sir2ila|ila2sir)]"
" [csum-mode (no-action|neutral-map|transport-adjust)] [del]",
.function = ila_entry_command_fn,
}
static clib_error_t * ila_entry_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ila.c:952

(constructor) VLIB_CLI_COMMAND (ila_entry_command)

Definition at line 1022 of file ila.c.

◆ ila_error_strings

char* ila_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_ila_error
Definition: ila.c:28

Definition at line 38 of file ila.c.

◆ ila_fib_node_type

fib_node_type_t ila_fib_node_type
static

Dynamically registered FIB node type for ILA.

Definition at line 69 of file ila.c.

◆ ila_fib_node_vft

const fib_node_vft_t ila_fib_node_vft
static
Initial value:
= {
.fnv_last_lock = ila_fib_node_last_lock_gone,
}
static fib_node_t * ila_fib_node_get_node(fib_node_index_t index)
Definition: ila.c:881
static fib_node_back_walk_rc_t ila_fib_node_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
Callback function invoked when the forwarding changes for the ILA next-hop.
Definition: ila.c:910
static void ila_fib_node_last_lock_gone(fib_node_t *node)
no-op unlock function.
Definition: ila.c:894

Definition at line 921 of file ila.c.

◆ ila_fib_src

fib_source_t ila_fib_src
static

FIB source for adding entries.

Definition at line 74 of file ila.c.

◆ ila_ila2sir_node

static vlib_node_registration_t ila_ila2sir_node
static
Initial value:
=
{
.function = ila_ila2sir,
.name = "ila-to-sir",
.vector_size = sizeof (u32),
.format_trace = format_ila_ila2sir_trace,
.n_errors = ILA_N_ERROR,
.error_strings = ila_error_strings,
.n_next_nodes = ILA_ILA2SIR_N_NEXT,
.next_nodes =
{
[ILA_ILA2SIR_NEXT_DROP] = "error-drop"
},
}
unsigned int u32
Definition: types.h:88
static char * ila_error_strings[]
Definition: ila.c:38
u8 * format_ila_ila2sir_trace(u8 *s, va_list *args)
Definition: ila.c:170
static uword ila_ila2sir(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ila.c:257

INDENT-OFF

(constructor) VLIB_REGISTER_NODE (ila_ila2sir_node)

Definition at line 254 of file ila.c.

◆ ila_interface_command

vlib_cli_command_t ila_interface_command
static
Initial value:
=
{
.path = "ila interface",
.short_help = "ila interface <interface-name> [disable]",
}
static clib_error_t * ila_interface_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ila.c:1032

(constructor) VLIB_CLI_COMMAND (ila_interface_command)

Definition at line 1056 of file ila.c.

◆ ila_ip6_nodes

const char* const ila_ip6_nodes[]
static
Initial value:
=
{
"ila-to-sir",
}
#define NULL
Definition: clib.h:58

Definition at line 870 of file ila.c.

◆ ila_main

ila_main_t ila_main
static

Definition at line 23 of file ila.c.

◆ ila_nodes

const char* const* const ila_nodes[DPO_PROTO_NUM]
static
Initial value:
=
{
}
static const char *const ila_ip6_nodes[]
Definition: ila.c:870

Definition at line 875 of file ila.c.

◆ ila_show_entries_command

vlib_cli_command_t ila_show_entries_command
static
Initial value:
=
{
.path = "show ila entries",
.short_help = "show ila entries",
}
static clib_error_t * ila_show_entries_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ila.c:1064

(constructor) VLIB_CLI_COMMAND (ila_show_entries_command)

Definition at line 1081 of file ila.c.

◆ ila_sir2ila_default_entry

ila_entry_t ila_sir2ila_default_entry
static
Initial value:
= {
.csum_mode = ILA_CSUM_MODE_NO_ACTION,
.type = ILA_TYPE_IID,
.dir = ILA_DIR_ILA2SIR,
}

Definition at line 55 of file ila.c.

◆ ila_sir2ila_node

static vlib_node_registration_t ila_sir2ila_node
static
Initial value:
=
{
.function = ila_sir2ila,.name = "sir-to-ila",
.vector_size = sizeof (u32),
.format_trace = format_ila_sir2ila_trace,
.n_errors = ILA_N_ERROR,
.error_strings = ila_error_strings,
.n_next_nodes = ILA_SIR2ILA_N_NEXT,
.next_nodes =
{
[ILA_SIR2ILA_NEXT_DROP] = "error-drop"
},
}
u8 * format_ila_sir2ila_trace(u8 *s, va_list *args)
Definition: ila.c:418
unsigned int u32
Definition: types.h:88
static char * ila_error_strings[]
Definition: ila.c:38
static uword ila_sir2ila(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ila.c:431

INDENT-OFF

(constructor) VLIB_REGISTER_NODE (ila_sir2ila_node)

Definition at line 428 of file ila.c.

◆ ila_vft

const dpo_vft_t ila_vft
static
Initial value:
= {
.dv_lock = ila_dpo_lock,
.dv_unlock = ila_dpo_unlock,
.dv_format = format_ila_dpo,
}
static void ila_dpo_unlock(dpo_id_t *dpo)
no-op unlock function.
Definition: ila.c:861
u8 * format_ila_dpo(u8 *s, va_list *va)
Definition: ila.c:836
static void ila_dpo_lock(dpo_id_t *dpo)
no-op lock function.
Definition: ila.c:852

Definition at line 865 of file ila.c.