FD.io VPP  v18.11-rc0-18-g2a3fb1a
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 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

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

Definition at line 28 of file ila.c.

#define ILA_TABLE_DEFAULT_HASH_MEMORY_SIZE   (32<<20)

Definition at line 26 of file ila.c.

#define ILA_TABLE_DEFAULT_HASH_NUM_BUCKETS   (64 * 1024)

Definition at line 25 of file ila.c.

Enumeration Type Documentation

Enumerator
ILA_N_ERROR 
STN_IP_PUNT_N_ERROR 

Definition at line 31 of file ila.c.

Enumerator
ILA_ILA2SIR_NEXT_DROP 
ILA_ILA2SIR_N_NEXT 

Definition at line 44 of file ila.c.

INDENT-ON

Enumerator
ILA_SIR2ILA_NEXT_DROP 
ILA_SIR2ILA_N_NEXT 

Definition at line 400 of file ila.c.

Function Documentation

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

Definition at line 94 of file ila.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_half_ip6_address ( u8 s,
va_list *  va 
)

Definition at line 72 of file ila.c.

+ Here is the call graph for this function:

u8* format_ila_direction ( u8 s,
va_list *  args 
)

Definition at line 82 of file ila.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_ila_dpo ( u8 s,
va_list *  va 
)

Definition at line 831 of file ila.c.

+ Here is the call graph for this function:

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

Definition at line 127 of file ila.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_ila_ila2sir_trace ( u8 s,
va_list *  args 
)

Definition at line 165 of file ila.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_ila_sir2ila_trace ( u8 s,
va_list *  args 
)

Definition at line 413 of file ila.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_ila_type ( u8 s,
va_list *  args 
)

Definition at line 115 of file ila.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ila_add_del_entry ( ila_add_del_entry_args_t args)

Definition at line 622 of file ila.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 847 of file ila.c.

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 856 of file ila.c.

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 945 of file ila.c.

+ Here is the call graph for this function:

static ila_entry_t* ila_entry_from_fib_node ( fib_node_t node)
static

Definition at line 894 of file ila.c.

+ Here is the caller graph for this function:

static void ila_entry_stack ( ila_entry_t ie)
static

INDENT-ON

Definition at line 609 of file ila.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 905 of file ila.c.

+ Here is the call graph for this function:

static fib_node_t* ila_fib_node_get_node ( fib_node_index_t  index)
static

Definition at line 876 of file ila.c.

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 889 of file ila.c.

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

Definition at line 252 of file ila.c.

+ Here is the call graph for this function:

clib_error_t* ila_init ( vlib_main_t vm)

Definition at line 923 of file ila.c.

+ Here is the call graph for this function:

int ila_interface ( u32  sw_if_index,
u8  disable 
)

Definition at line 817 of file ila.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 1025 of file ila.c.

+ Here is the call graph for this function:

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 1057 of file ila.c.

+ Here is the call graph for this function:

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

Definition at line 426 of file ila.c.

+ Here is the call graph for this function:

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

Definition at line 231 of file ila.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 209 of file ila.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 177 of file ila.c.

+ Here is the caller graph for this function:

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

Definition at line 193 of file ila.c.

+ Here is the caller graph for this function:

VLIB_PLUGIN_REGISTER ( )

+ Here is the caller graph for this function:

VNET_FEATURE_INIT ( ila_sir2ila  ,
static   
)

INDENT-ON

INDENT-OFF

+ Here is the caller graph for this function:

Variable Documentation

dpo_type_t ila_dpo_type
static

Dynamically registered DPO Type for ILA.

Definition at line 64 of file ila.c.

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:945

(constructor) VLIB_CLI_COMMAND (ila_entry_command)

Definition at line 1015 of file ila.c.

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.

fib_node_type_t ila_fib_node_type
static

Dynamically registered FIB node type for ILA.

Definition at line 69 of file ila.c.

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:876
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:905
static void ila_fib_node_last_lock_gone(fib_node_t *node)
no-op unlock function.
Definition: ila.c:889

Definition at line 916 of file ila.c.

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:165
static uword ila_ila2sir(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ila.c:252

INDENT-OFF

(constructor) VLIB_REGISTER_NODE (ila_ila2sir_node)

Definition at line 249 of file ila.c.

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:1025

(constructor) VLIB_CLI_COMMAND (ila_interface_command)

Definition at line 1049 of file ila.c.

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

Definition at line 865 of file ila.c.

ila_main_t ila_main
static

Definition at line 23 of file ila.c.

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

Definition at line 870 of file ila.c.

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:1057

(constructor) VLIB_CLI_COMMAND (ila_show_entries_command)

Definition at line 1074 of file ila.c.

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.

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:413
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:426

INDENT-OFF

(constructor) VLIB_REGISTER_NODE (ila_sir2ila_node)

Definition at line 423 of file ila.c.

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:856
u8 * format_ila_dpo(u8 *s, va_list *va)
Definition: ila.c:831
static void ila_dpo_lock(dpo_id_t *dpo)
no-op lock function.
Definition: ila.c:847

Definition at line 860 of file ila.c.