FD.io VPP  v16.06
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)
 

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)
Definition: pool.h:328
cnat_vrfmap_t * cnat_map_by_vrf
Definition: cnat_db_v2.c:212

Definition at line 58 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 87 of file vcgn_classify.c.

Enumeration Type Documentation

Enumerator
VCGN_CLASSIFY_N_ERROR 

Definition at line 96 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 124 of file vcgn_classify.c.

Function Documentation

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

Definition at line 70 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 789 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 816 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 776 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 727 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 685 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 550 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 588 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 926 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 752 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 706 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 640 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 662 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 430 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 439 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 495 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 416 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 391 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 141 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 1365 of file vcgn_classify.c.

+ Here is the call graph for this function:

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 1318 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 1306 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 1288 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 1282 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] 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 1330 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 1324 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 1312 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 1294 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 1300 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 1338 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> "
"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 1350 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> "
"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 1357 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 1344 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:87

Definition at line 103 of file vcgn_classify.c.

vcgn_classify_main_t vcgn_classify_main

Definition at line 83 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:70
#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 85 of file vcgn_classify.c.