FD.io VPP  v16.09
Vector Packet Processing
vcgn_classify.c File Reference
+ Include dependency graph for vcgn_classify.c:

Go to the source code of this file.

Data Structures

struct  vcgn_classify_main_t
 
struct  vcgn_classify_trace_t
 

Macros

#define FIND_MY_VRF_USING_I_VRF_ID
 
#define foreach_vcgn_classify_error
 

Enumerations

enum  vcgn_classify_error_t { VCGN_CLASSIFY_N_ERROR }
 
enum  vcgn_classify_next_t {
  VCGN_CLASSIFY_NEXT_IP4_INPUT, VCGN_CLASSIFY_NEXT_IP6_INPUT, VCGN_CLASSIFY_NEXT_MPLS_INPUT, VCGN_CLASSIFY_NEXT_ETHERNET_INPUT,
  VCGN_CLASSIFY_NEXT_UDP_INSIDE, VCGN_CLASSIFY_NEXT_UDP_OUTSIDE, VCGN_CLASSIFY_NEXT_TCP_INSIDE, VCGN_CLASSIFY_NEXT_TCP_OUTSIDE,
  VCGN_CLASSIFY_NEXT_ICMP_Q_INSIDE, VCGN_CLASSIFY_NEXT_ICMP_Q_OUTSIDE, VCGN_CLASSIFY_NEXT_ICMP_E_INSIDE, VCGN_CLASSIFY_NEXT_ICMP_E_OUTSIDE,
  VCGN_CLASSIFY_N_NEXT
}
 

Functions

static u8format_swap_trace (u8 *s, va_list *args)
 
static uword vcgn_classify_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
clib_error_tvcgn_classify_init (vlib_main_t *vm)
 
static clib_error_tshow_vcgn_stats_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_vcgn_config_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_vcgn_inside_translation_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_vcgn_outside_translation_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_vcgn_inside_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_vcgn_map_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_vcgn_tcp_timeout_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_vcgn_udp_timeout_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_vcgn_icmp_timeout_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_vcgn_protocol_default_timeout_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_vcgn_dynamic_port_start_range_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tset_vcgn_port_limit_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static void nfv9_init_pkt_sent_data (cnat_nfv9_logging_info_t *nfv9_info)
 
static u16 nfv9_get_max_length_minus_max_record_size (u16 path_mtu)
 
static u16 nfv9_get_server_instance (cnat_nfv9_logging_info_t *nfv9_info, nfv9_server_info_t *new_server_info)
 
static clib_error_tset_vcgn_nfv9_logging_cofig_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tvcgn_init (vlib_main_t *vm)
 
vlib_init_function_t *_vlib_init_function_vcgn_init **Also collects global variable pointers passed from the vpp engine *clib_error_tvlib_plugin_register (vlib_main_t *vm, vnet_plugin_handoff_t *h, int from_early_init)
 

Variables

vcgn_classify_main_t vcgn_classify_main
 
vlib_node_registration_t vcgn_classify_node
 (constructor) VLIB_REGISTER_NODE (vcgn_classify_node) More...
 
static char * vcgn_classify_error_strings []
 
vlib_cli_command_t set_vcgn_map_command
 (constructor) VLIB_CLI_COMMAND (set_vcgn_map_command) More...
 
vlib_cli_command_t set_vcgn_inside_command
 (constructor) VLIB_CLI_COMMAND (set_vcgn_inside_command) More...
 
vlib_cli_command_t set_vcgn_tcp_timeout_command
 (constructor) VLIB_CLI_COMMAND (set_vcgn_tcp_timeout_command) More...
 
vlib_cli_command_t set_vcgn_udp_timeout_command
 (constructor) VLIB_CLI_COMMAND (set_vcgn_udp_timeout_command) More...
 
vlib_cli_command_t set_vcgn_icmp_timeout_command
 (constructor) VLIB_CLI_COMMAND (set_vcgn_icmp_timeout_command) More...
 
vlib_cli_command_t set_vcgn_protocol_default_timeout_command
 (constructor) VLIB_CLI_COMMAND (set_vcgn_protocol_default_timeout_command) More...
 
vlib_cli_command_t set_vcgn_dynamic_port_start_range_command
 (constructor) VLIB_CLI_COMMAND (set_vcgn_dynamic_port_start_range_command) More...
 
vlib_cli_command_t set_vcgn_port_limit_command
 (constructor) VLIB_CLI_COMMAND (set_vcgn_port_limit_command) More...
 
vlib_cli_command_t set_vcgn_nfv9_logging_cofig_command
 (constructor) VLIB_CLI_COMMAND (set_vcgn_nfv9_logging_cofig_command) More...
 
vlib_cli_command_t show_vcgn_config_command
 (constructor) VLIB_CLI_COMMAND (show_vcgn_config_command) More...
 
vlib_cli_command_t show_vcgn_stat_command
 (constructor) VLIB_CLI_COMMAND (show_vcgn_stat_command) More...
 
vlib_cli_command_t show_vcgn_inside_translation_command
 (constructor) VLIB_CLI_COMMAND (show_vcgn_inside_translation_command) More...
 
vlib_cli_command_t show_vcgn_outside_translation_command
 (constructor) VLIB_CLI_COMMAND (show_vcgn_outside_translation_command) More...
 

Macro Definition Documentation

#define FIND_MY_VRF_USING_I_VRF_ID
Value:
my_vrfmap_found = 0; \
pool_foreach (my_vrfmap, cnat_map_by_vrf, ({ \
if (my_vrfmap->i_vrf_id == i_vrf_id) { \
my_vrfmap_found = 1; \
my_vrfmap_temp = my_vrfmap; \
break; \
} \
}));
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
Definition: pool.h:348
cnat_vrfmap_t * cnat_map_by_vrf
Definition: cnat_db_v2.c:218

Definition at line 60 of file vcgn_classify.c.

#define foreach_vcgn_classify_error
Value:
_(PACKETS_RECEIVED, "total packets received") \
_(V4_PACKETS_PROCESSED, "ipv4 packets processed for vCGN") \
_(V4_PACKETS_PUNTED, "ipv4 packets punted") \
_(V6_PACKETS_PUNTED, "ipv6 packets punted") \
_(MPLS_PACKETS_PUNTED, "mpls unicast packets punted") \
_(ETH_PACKETS_PUNTED, "ethernet packets punted")

Definition at line 89 of file vcgn_classify.c.

Enumeration Type Documentation

Enumerator
VCGN_CLASSIFY_N_ERROR 

Definition at line 98 of file vcgn_classify.c.

Enumerator
VCGN_CLASSIFY_NEXT_IP4_INPUT 
VCGN_CLASSIFY_NEXT_IP6_INPUT 
VCGN_CLASSIFY_NEXT_MPLS_INPUT 
VCGN_CLASSIFY_NEXT_ETHERNET_INPUT 
VCGN_CLASSIFY_NEXT_UDP_INSIDE 
VCGN_CLASSIFY_NEXT_UDP_OUTSIDE 
VCGN_CLASSIFY_NEXT_TCP_INSIDE 
VCGN_CLASSIFY_NEXT_TCP_OUTSIDE 
VCGN_CLASSIFY_NEXT_ICMP_Q_INSIDE 
VCGN_CLASSIFY_NEXT_ICMP_Q_OUTSIDE 
VCGN_CLASSIFY_NEXT_ICMP_E_INSIDE 
VCGN_CLASSIFY_NEXT_ICMP_E_OUTSIDE 
VCGN_CLASSIFY_N_NEXT 

Definition at line 126 of file vcgn_classify.c.

Function Documentation

static u8* format_swap_trace ( u8 s,
va_list *  args 
)
static

Definition at line 72 of file vcgn_classify.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u16 nfv9_get_max_length_minus_max_record_size ( u16  path_mtu)
inlinestatic

Definition at line 862 of file vcgn_classify.c.

+ Here is the caller graph for this function:

static u16 nfv9_get_server_instance ( cnat_nfv9_logging_info_t nfv9_info,
nfv9_server_info_t new_server_info 
)
static

Definition at line 889 of file vcgn_classify.c.

+ Here is the caller graph for this function:

static void nfv9_init_pkt_sent_data ( cnat_nfv9_logging_info_t nfv9_info)
inlinestatic

Definition at line 849 of file vcgn_classify.c.

+ Here is the caller graph for this function:

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

Definition at line 800 of file vcgn_classify.c.

+ Here is the call graph for this function:

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

Definition at line 758 of file vcgn_classify.c.

+ Here is the call graph for this function:

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

Definition at line 589 of file vcgn_classify.c.

+ Here is the call graph for this function:

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

Definition at line 650 of file vcgn_classify.c.

+ Here is the call graph for this function:

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

Definition at line 999 of file vcgn_classify.c.

+ Here is the call graph for this function:

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

Definition at line 825 of file vcgn_classify.c.

+ Here is the call graph for this function:

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

Definition at line 779 of file vcgn_classify.c.

+ Here is the call graph for this function:

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

Definition at line 713 of file vcgn_classify.c.

+ Here is the call graph for this function:

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

Definition at line 735 of file vcgn_classify.c.

+ Here is the call graph for this function:

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

Definition at line 455 of file vcgn_classify.c.

+ Here is the call graph for this function:

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

Definition at line 464 of file vcgn_classify.c.

+ Here is the call graph for this function:

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

Definition at line 525 of file vcgn_classify.c.

+ Here is the call graph for this function:

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

Definition at line 441 of file vcgn_classify.c.

+ Here is the call graph for this function:

clib_error_t* vcgn_classify_init ( vlib_main_t vm)

Definition at line 403 of file vcgn_classify.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 143 of file vcgn_classify.c.

+ Here is the call graph for this function:

static clib_error_t* vcgn_init ( vlib_main_t vm)
static

Definition at line 1449 of file vcgn_classify.c.

+ Here is the call graph for this function:

vlib_init_function_t* _vlib_init_function_vcgn_init* * Also collects global variable pointers passed from the vpp engine* clib_error_t* vlib_plugin_register ( vlib_main_t vm,
vnet_plugin_handoff_t h,
int  from_early_init 
)

Definition at line 1504 of file vcgn_classify.c.

Variable Documentation

vlib_cli_command_t set_vcgn_dynamic_port_start_range_command
Initial value:
= {
.path = "set vcgn dynamic port start",
.short_help = "set vcgn dynamic port start <1-65535>",
}
static clib_error_t * set_vcgn_dynamic_port_start_range_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (set_vcgn_dynamic_port_start_range_command)

Definition at line 1398 of file vcgn_classify.c.

vlib_cli_command_t set_vcgn_icmp_timeout_command
Initial value:
= {
.path = "set vcgn icmp timeout",
.short_help = "set vcgn icmp timeout <1-65535>",
}
static clib_error_t * set_vcgn_icmp_timeout_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (set_vcgn_icmp_timeout_command)

Definition at line 1386 of file vcgn_classify.c.

vlib_cli_command_t set_vcgn_inside_command
Initial value:
= {
.path = "set vcgn inside",
.short_help = "set vcgn inside <inside intfc> outside <outside intfc>",
}
static clib_error_t * set_vcgn_inside_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (set_vcgn_inside_command)

Definition at line 1368 of file vcgn_classify.c.

vlib_cli_command_t set_vcgn_map_command
Initial value:
= {
.path = "set vcgn map",
.short_help = "set vcgn map <lo-address> [- <hi-address>]",
}
static clib_error_t * set_vcgn_map_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (set_vcgn_map_command)

Definition at line 1362 of file vcgn_classify.c.

vlib_cli_command_t set_vcgn_nfv9_logging_cofig_command
Initial value:
= {
.path = "set vcgn nfv9",
.short_help = "set vcgn nfv9 [del] inside <interface> "
"server <ip-addr> port <port> [refresh-rate <n>] "
"[timeout <n>] [pmtu <n>]",
}
static clib_error_t * set_vcgn_nfv9_logging_cofig_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (set_vcgn_nfv9_logging_cofig_command)

Definition at line 1410 of file vcgn_classify.c.

vlib_cli_command_t set_vcgn_port_limit_command
Initial value:
= {
.path = "set vcgn port limit",
.short_help = "set vcgn port limit <1-65535>",
}
static clib_error_t * set_vcgn_port_limit_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (set_vcgn_port_limit_command)

Definition at line 1404 of file vcgn_classify.c.

vlib_cli_command_t set_vcgn_protocol_default_timeout_command
Initial value:
= {
.path = "set vcgn default timeout",
.short_help = "set vcgn default timeout protocol <tcp/udp/icmp>",
}
static clib_error_t * set_vcgn_protocol_default_timeout_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (set_vcgn_protocol_default_timeout_command)

Definition at line 1392 of file vcgn_classify.c.

vlib_cli_command_t set_vcgn_tcp_timeout_command
Initial value:
= {
.path = "set vcgn tcp timeout",
.short_help = "set vcgn tcp timeout active <1-65535> init <1-65535>",
}
static clib_error_t * set_vcgn_tcp_timeout_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (set_vcgn_tcp_timeout_command)

Definition at line 1374 of file vcgn_classify.c.

vlib_cli_command_t set_vcgn_udp_timeout_command
Initial value:
= {
.path = "set vcgn udp timeout",
.short_help = "set vcgn udp timeout active <1-65535> init <1-65535>",
}
static clib_error_t * set_vcgn_udp_timeout_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (set_vcgn_udp_timeout_command)

Definition at line 1380 of file vcgn_classify.c.

vlib_cli_command_t show_vcgn_config_command
Initial value:
= {
.path = "show vcgn config",
.short_help = "show vcgn config",
}
static clib_error_t * show_vcgn_config_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (show_vcgn_config_command)

Definition at line 1420 of file vcgn_classify.c.

vlib_cli_command_t show_vcgn_inside_translation_command
Initial value:
= {
.path = "show vcgn inside-translation",
.short_help = "show vcgn inside-translation protocol <tcp/udp/icmp> "
"interface <inside-if> inside-addr <ip-addr> "
"[start-port <n>] [end-port <n>]",
}
static clib_error_t * show_vcgn_inside_translation_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (show_vcgn_inside_translation_command)

Definition at line 1432 of file vcgn_classify.c.

vlib_cli_command_t show_vcgn_outside_translation_command
Initial value:
= {
.path = "show vcgn outside-translation",
.short_help = "show vcgn outside-translation protocol <tcp/udp/icmp> "
"interface <outside-if> outside-addr <ip-addr> "
"[start-port <n>] [end-port <n>]",
}
static clib_error_t * show_vcgn_outside_translation_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (show_vcgn_outside_translation_command)

Definition at line 1440 of file vcgn_classify.c.

vlib_cli_command_t show_vcgn_stat_command
Initial value:
= {
.path = "show vcgn statistics",
.short_help = "show vcgn statistics",
}
static clib_error_t * show_vcgn_stats_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (show_vcgn_stat_command)

Definition at line 1426 of file vcgn_classify.c.

char* vcgn_classify_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_vcgn_classify_error
Definition: vcgn_classify.c:89

Definition at line 105 of file vcgn_classify.c.

vcgn_classify_main_t vcgn_classify_main

Definition at line 85 of file vcgn_classify.c.

vlib_node_registration_t vcgn_classify_node
Initial value:
= {
.function = vcgn_classify_node_fn,
.name = "vcgn-classify",
.vector_size = sizeof (u32),
.format_trace = format_swap_trace,
.error_strings = vcgn_classify_error_strings,
.n_next_nodes = VCGN_CLASSIFY_N_NEXT,
.next_nodes = {
[VCGN_CLASSIFY_NEXT_MPLS_INPUT] = "mpls-gre-input",
[VCGN_CLASSIFY_NEXT_ETHERNET_INPUT] = "ethernet-input",
[VCGN_CLASSIFY_NEXT_UDP_INSIDE] = "vcgn-v4-udp-i2o",
[VCGN_CLASSIFY_NEXT_UDP_OUTSIDE] = "vcgn-v4-udp-o2i",
[VCGN_CLASSIFY_NEXT_TCP_INSIDE] = "vcgn-v4-tcp-i2o",
[VCGN_CLASSIFY_NEXT_TCP_OUTSIDE] = "vcgn-v4-tcp-o2i",
[VCGN_CLASSIFY_NEXT_ICMP_Q_INSIDE] = "vcgn-v4-icmp-q-i2o",
[VCGN_CLASSIFY_NEXT_ICMP_Q_OUTSIDE] = "vcgn-v4-icmp-q-o2i",
[VCGN_CLASSIFY_NEXT_ICMP_E_INSIDE] = "vcgn-v4-icmp-e-i2o",
[VCGN_CLASSIFY_NEXT_ICMP_E_OUTSIDE] = "vcgn-v4-icmp-e-o2i"
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static uword vcgn_classify_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static char * vcgn_classify_error_strings[]
static u8 * format_swap_trace(u8 *s, va_list *args)
Definition: vcgn_classify.c:72
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (vcgn_classify_node)

Definition at line 87 of file vcgn_classify.c.