FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
vnet_classify.c File Reference

N-tuple classifier. More...

+ Include dependency graph for vnet_classify.c:

Go to the source code of this file.

Data Structures

struct  tcpudp_header_t
 

Macros

#define foreach_tcp_proto_field
 
#define foreach_udp_proto_field
 
#define foreach_ip4_proto_field
 
#define foreach_ip6_proto_field
 
#define foreach_l2_input_next
 
#define foreach_l2_output_next   _(drop, DROP)
 
#define foreach_ip_next
 
#define foreach_acl_next   _(deny, DENY)
 
#define TEST_CODE   0
 

Functions

void mv (vnet_classify_table_t *t)
 
void rogue (vnet_classify_table_t *t)
 
void vnet_classify_register_unformat_l2_next_index_fn (unformat_function_t *fn)
 
void vnet_classify_register_unformat_ip_next_index_fn (unformat_function_t *fn)
 
void vnet_classify_register_unformat_acl_next_index_fn (unformat_function_t *fn)
 
void vnet_classify_register_unformat_policer_next_index_fn (unformat_function_t *fn)
 
void vnet_classify_register_unformat_opaque_index_fn (unformat_function_t *fn)
 
vnet_classify_table_tvnet_classify_new_table (vnet_classify_main_t *cm, const u8 *mask, u32 nbuckets, u32 memory_size, u32 skip_n_vectors, u32 match_n_vectors)
 
void vnet_classify_delete_table_index (vnet_classify_main_t *cm, u32 table_index, int del_chain)
 
static vnet_classify_entry_tvnet_classify_entry_alloc (vnet_classify_table_t *t, u32 log2_pages)
 
static void vnet_classify_entry_free (vnet_classify_table_t *t, vnet_classify_entry_t *v, u32 log2_pages)
 
static void make_working_copy (vnet_classify_table_t *t, vnet_classify_bucket_t *b)
 
static vnet_classify_entry_tsplit_and_rehash (vnet_classify_table_t *t, vnet_classify_entry_t *old_values, u32 old_log2_pages, u32 new_log2_pages)
 
static vnet_classify_entry_tsplit_and_rehash_linear (vnet_classify_table_t *t, vnet_classify_entry_t *old_values, u32 old_log2_pages, u32 new_log2_pages)
 
static void vnet_classify_entry_claim_resource (vnet_classify_entry_t *e)
 
static void vnet_classify_entry_release_resource (vnet_classify_entry_t *e)
 
static int vnet_classify_add_del (vnet_classify_table_t *t, vnet_classify_entry_t *add_v, int is_add)
 
typedef CLIB_PACKED (struct { ethernet_header_t eh;ip4_header_t ip;})
 
vnet_classify_entry_tvnet_classify_find_entry (vnet_classify_table_t *t, u8 *h, u64 hash, f64 now)
 
static u8format_classify_entry (u8 *s, va_list *args)
 
u8format_classify_table (u8 *s, va_list *args)
 
int vnet_classify_add_del_table (vnet_classify_main_t *cm, const u8 *mask, u32 nbuckets, u32 memory_size, u32 skip, u32 match, u32 next_table_index, u32 miss_next_index, u32 *table_index, u8 current_data_flag, i16 current_data_offset, int is_add, int del_chain)
 
uword unformat_tcp_mask (unformat_input_t *input, va_list *args)
 
uword unformat_udp_mask (unformat_input_t *input, va_list *args)
 
uword unformat_l4_mask (unformat_input_t *input, va_list *args)
 
uword unformat_ip4_mask (unformat_input_t *input, va_list *args)
 
uword unformat_ip6_mask (unformat_input_t *input, va_list *args)
 
uword unformat_l3_mask (unformat_input_t *input, va_list *args)
 
uword unformat_l2_mask (unformat_input_t *input, va_list *args)
 
uword unformat_classify_mask (unformat_input_t *input, va_list *args)
 
uword unformat_l2_input_next_index (unformat_input_t *input, va_list *args)
 
uword unformat_l2_output_next_index (unformat_input_t *input, va_list *args)
 
uword unformat_ip_next_index (unformat_input_t *input, va_list *args)
 
uword unformat_acl_next_index (unformat_input_t *input, va_list *args)
 
uword unformat_policer_next_index (unformat_input_t *input, va_list *args)
 
static clib_error_tclassify_table_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static int filter_table_mask_compare (void *a1, void *a2)
 
u32 classify_sort_table_chain (vnet_classify_main_t *cm, u32 table_index)
 
u32 classify_get_trace_chain (void)
 
void classify_set_trace_chain (vnet_classify_main_t *cm, u32 table_index)
 
u32 classify_get_pcap_chain (vnet_classify_main_t *cm, u32 sw_if_index)
 
void classify_set_pcap_chain (vnet_classify_main_t *cm, u32 sw_if_index, u32 table_index)
 
u32 classify_lookup_chain (u32 table_index, u8 *mask, u32 n_skip, u32 n_match)
 
static clib_error_tclassify_filter_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
int vlib_enable_disable_pkt_trace_filter (int enable)
 Enable / disable packet trace filter. More...
 
static clib_error_tshow_classify_filter_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
u8format_vnet_classify_table (u8 *s, va_list *args)
 
static clib_error_tshow_classify_tables_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
uword unformat_l4_match (unformat_input_t *input, va_list *args)
 
uword unformat_ip4_match (unformat_input_t *input, va_list *args)
 
uword unformat_ip6_match (unformat_input_t *input, va_list *args)
 
uword unformat_l3_match (unformat_input_t *input, va_list *args)
 
uword unformat_vlan_tag (unformat_input_t *input, va_list *args)
 
uword unformat_l2_match (unformat_input_t *input, va_list *args)
 
uword unformat_classify_match (unformat_input_t *input, va_list *args)
 
int vnet_classify_add_del_session (vnet_classify_main_t *cm, u32 table_index, const u8 *match, u32 hit_next_index, u32 opaque_index, i32 advance, u8 action, u16 metadata, int is_add)
 
static clib_error_tclassify_session_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static uword unformat_opaque_sw_if_index (unformat_input_t *input, va_list *args)
 
static uword unformat_ip_next_node (unformat_input_t *input, va_list *args)
 
static uword unformat_acl_next_node (unformat_input_t *input, va_list *args)
 
static uword unformat_l2_input_next_node (unformat_input_t *input, va_list *args)
 
static uword unformat_l2_output_next_node (unformat_input_t *input, va_list *args)
 
static clib_error_tvnet_classify_init (vlib_main_t *vm)
 
int vnet_is_packet_traced (vlib_buffer_t *b, u32 classify_table_index, int func)
 

Variables

vnet_classify_main_t vnet_classify_main
 
static vlib_cli_command_t classify_table
 (constructor) VLIB_CLI_COMMAND (classify_table) More...
 
static vlib_cli_command_t classify_filter
 (constructor) VLIB_CLI_COMMAND (classify_filter) More...
 
static vlib_cli_command_t show_classify_filter
 (constructor) VLIB_CLI_COMMAND (show_classify_filter) More...
 
static vlib_cli_command_t show_classify_table_command
 (constructor) VLIB_CLI_COMMAND (show_classify_table_command) More...
 
static vlib_cli_command_t classify_session_command
 (constructor) VLIB_CLI_COMMAND (classify_session_command) More...
 

Detailed Description

N-tuple classifier.

Definition in file vnet_classify.c.

Macro Definition Documentation

◆ foreach_acl_next

#define foreach_acl_next   _(deny, DENY)

Definition at line 1441 of file vnet_classify.c.

◆ foreach_ip4_proto_field

#define foreach_ip4_proto_field
Value:
_(dst_address) \
_(tos) \
_(length) \
_(fragment_id) \
_(ttl) \
_(checksum)

Definition at line 799 of file vnet_classify.c.

◆ foreach_ip6_proto_field

#define foreach_ip6_proto_field
Value:
_(dst_address) \
_(payload_length) \

Definition at line 1017 of file vnet_classify.c.

◆ foreach_ip_next

#define foreach_ip_next
Value:
_(drop, DROP) \
_(rewrite, REWRITE)

Definition at line 1400 of file vnet_classify.c.

◆ foreach_l2_input_next

#define foreach_l2_input_next
Value:
_(drop, DROP) \
_(ethernet, ETHERNET_INPUT) \
_(ip4, IP4_INPUT) \
_(ip6, IP6_INPUT) \
_(li, LI)

Definition at line 1316 of file vnet_classify.c.

◆ foreach_l2_output_next

#define foreach_l2_output_next   _(drop, DROP)

Definition at line 1360 of file vnet_classify.c.

◆ foreach_tcp_proto_field

#define foreach_tcp_proto_field
Value:
_(src) \
_(dst)

Definition at line 791 of file vnet_classify.c.

◆ foreach_udp_proto_field

#define foreach_udp_proto_field
Value:

Definition at line 795 of file vnet_classify.c.

◆ TEST_CODE

#define TEST_CODE   0

Definition at line 3048 of file vnet_classify.c.

Function Documentation

◆ classify_filter_command_fn()

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

Definition at line 1834 of file vnet_classify.c.

+ Here is the call graph for this function:

◆ classify_get_pcap_chain()

u32 classify_get_pcap_chain ( vnet_classify_main_t cm,
u32  sw_if_index 
)

Definition at line 1749 of file vnet_classify.c.

+ Here is the caller graph for this function:

◆ classify_get_trace_chain()

u32 classify_get_trace_chain ( void  )

Definition at line 1721 of file vnet_classify.c.

+ Here is the caller graph for this function:

◆ classify_lookup_chain()

u32 classify_lookup_chain ( u32  table_index,
u8 mask,
u32  n_skip,
u32  n_match 
)

Definition at line 1800 of file vnet_classify.c.

+ Here is the caller graph for this function:

◆ classify_session_command_fn()

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

Definition at line 2799 of file vnet_classify.c.

+ Here is the call graph for this function:

◆ classify_set_pcap_chain()

void classify_set_pcap_chain ( vnet_classify_main_t cm,
u32  sw_if_index,
u32  table_index 
)

Definition at line 1761 of file vnet_classify.c.

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

◆ classify_set_trace_chain()

void classify_set_trace_chain ( vnet_classify_main_t cm,
u32  table_index 
)

Definition at line 1734 of file vnet_classify.c.

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

◆ classify_sort_table_chain()

u32 classify_sort_table_chain ( vnet_classify_main_t cm,
u32  table_index 
)

Definition at line 1680 of file vnet_classify.c.

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

◆ classify_table_command_fn()

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

Definition at line 1520 of file vnet_classify.c.

+ Here is the call graph for this function:

◆ CLIB_PACKED()

typedef CLIB_PACKED ( struct { ethernet_header_t eh;ip4_header_t ip;}  )

Definition at line 644 of file vnet_classify.c.

◆ filter_table_mask_compare()

static int filter_table_mask_compare ( void *  a1,
void *  a2 
)
static

Definition at line 1636 of file vnet_classify.c.

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

◆ format_classify_entry()

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

Definition at line 664 of file vnet_classify.c.

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

◆ format_classify_table()

u8* format_classify_table ( u8 s,
va_list *  args 
)

Definition at line 687 of file vnet_classify.c.

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

◆ format_vnet_classify_table()

u8* format_vnet_classify_table ( u8 s,
va_list *  args 
)

Definition at line 2207 of file vnet_classify.c.

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

◆ make_working_copy()

static void make_working_copy ( vnet_classify_table_t t,
vnet_classify_bucket_t b 
)
inlinestatic

Definition at line 229 of file vnet_classify.c.

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

◆ mv()

void mv ( vnet_classify_table_t t)

Definition at line 79 of file vnet_classify.c.

+ Here is the caller graph for this function:

◆ rogue()

void rogue ( vnet_classify_table_t t)

Definition at line 84 of file vnet_classify.c.

◆ show_classify_filter_command_fn()

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

Definition at line 2120 of file vnet_classify.c.

+ Here is the call graph for this function:

◆ show_classify_tables_command_fn()

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

Definition at line 2244 of file vnet_classify.c.

+ Here is the call graph for this function:

◆ split_and_rehash()

static vnet_classify_entry_t* split_and_rehash ( vnet_classify_table_t t,
vnet_classify_entry_t old_values,
u32  old_log2_pages,
u32  new_log2_pages 
)
static

Definition at line 284 of file vnet_classify.c.

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

◆ split_and_rehash_linear()

static vnet_classify_entry_t* split_and_rehash_linear ( vnet_classify_table_t t,
vnet_classify_entry_t old_values,
u32  old_log2_pages,
u32  new_log2_pages 
)
static

Definition at line 335 of file vnet_classify.c.

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

◆ unformat_acl_next_index()

uword unformat_acl_next_index ( unformat_input_t input,
va_list *  args 
)

Definition at line 1445 of file vnet_classify.c.

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

◆ unformat_acl_next_node()

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

Definition at line 2947 of file vnet_classify.c.

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

◆ unformat_classify_mask()

uword unformat_classify_mask ( unformat_input_t input,
va_list *  args 
)

Definition at line 1226 of file vnet_classify.c.

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

◆ unformat_classify_match()

uword unformat_classify_match ( unformat_input_t input,
va_list *  args 
)

Definition at line 2667 of file vnet_classify.c.

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

◆ unformat_ip4_mask()

uword unformat_ip4_mask ( unformat_input_t input,
va_list *  args 
)

Definition at line 933 of file vnet_classify.c.

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

◆ unformat_ip4_match()

uword unformat_ip4_match ( unformat_input_t input,
va_list *  args 
)

Definition at line 2331 of file vnet_classify.c.

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

◆ unformat_ip6_mask()

uword unformat_ip6_mask ( unformat_input_t input,
va_list *  args 
)

Definition at line 1025 of file vnet_classify.c.

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

◆ unformat_ip6_match()

uword unformat_ip6_match ( unformat_input_t input,
va_list *  args 
)

Definition at line 2427 of file vnet_classify.c.

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

◆ unformat_ip_next_index()

uword unformat_ip_next_index ( unformat_input_t input,
va_list *  args 
)

Definition at line 1405 of file vnet_classify.c.

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

◆ unformat_ip_next_node()

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

Definition at line 2920 of file vnet_classify.c.

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

◆ unformat_l2_input_next_index()

uword unformat_l2_input_next_index ( unformat_input_t input,
va_list *  args 
)

Definition at line 1324 of file vnet_classify.c.

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

◆ unformat_l2_input_next_node()

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

Definition at line 2974 of file vnet_classify.c.

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

◆ unformat_l2_mask()

uword unformat_l2_mask ( unformat_input_t input,
va_list *  args 
)

Definition at line 1117 of file vnet_classify.c.

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

◆ unformat_l2_match()

uword unformat_l2_match ( unformat_input_t input,
va_list *  args 
)

Definition at line 2550 of file vnet_classify.c.

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

◆ unformat_l2_output_next_index()

uword unformat_l2_output_next_index ( unformat_input_t input,
va_list *  args 
)

Definition at line 1364 of file vnet_classify.c.

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

◆ unformat_l2_output_next_node()

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

Definition at line 2994 of file vnet_classify.c.

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

◆ unformat_l3_mask()

uword unformat_l3_mask ( unformat_input_t input,
va_list *  args 
)

Definition at line 1100 of file vnet_classify.c.

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

◆ unformat_l3_match()

uword unformat_l3_match ( unformat_input_t input,
va_list *  args 
)

Definition at line 2516 of file vnet_classify.c.

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

◆ unformat_l4_mask()

uword unformat_l4_mask ( unformat_input_t input,
va_list *  args 
)

Definition at line 897 of file vnet_classify.c.

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

◆ unformat_l4_match()

uword unformat_l4_match ( unformat_input_t input,
va_list *  args 
)

Definition at line 2300 of file vnet_classify.c.

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

◆ unformat_opaque_sw_if_index()

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

Definition at line 2905 of file vnet_classify.c.

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

◆ unformat_policer_next_index()

uword unformat_policer_next_index ( unformat_input_t input,
va_list *  args 
)

Definition at line 1487 of file vnet_classify.c.

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

◆ unformat_tcp_mask()

uword unformat_tcp_mask ( unformat_input_t input,
va_list *  args 
)

Definition at line 810 of file vnet_classify.c.

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

◆ unformat_udp_mask()

uword unformat_udp_mask ( unformat_input_t input,
va_list *  args 
)

Definition at line 851 of file vnet_classify.c.

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

◆ unformat_vlan_tag()

uword unformat_vlan_tag ( unformat_input_t input,
va_list *  args 
)

Definition at line 2534 of file vnet_classify.c.

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

◆ vlib_enable_disable_pkt_trace_filter()

int vlib_enable_disable_pkt_trace_filter ( int  enable)

Enable / disable packet trace filter.

Definition at line 2022 of file vnet_classify.c.

◆ vnet_classify_add_del()

static int vnet_classify_add_del ( vnet_classify_table_t t,
vnet_classify_entry_t add_v,
int  is_add 
)
static

Definition at line 418 of file vnet_classify.c.

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

◆ vnet_classify_add_del_session()

int vnet_classify_add_del_session ( vnet_classify_main_t cm,
u32  table_index,
const u8 match,
u32  hit_next_index,
u32  opaque_index,
i32  advance,
u8  action,
u16  metadata,
int  is_add 
)

Definition at line 2745 of file vnet_classify.c.

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

◆ vnet_classify_add_del_table()

int vnet_classify_add_del_table ( vnet_classify_main_t cm,
const u8 mask,
u32  nbuckets,
u32  memory_size,
u32  skip,
u32  match,
u32  next_table_index,
u32  miss_next_index,
u32 table_index,
u8  current_data_flag,
i16  current_data_offset,
int  is_add,
int  del_chain 
)

Definition at line 747 of file vnet_classify.c.

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

◆ vnet_classify_delete_table_index()

void vnet_classify_delete_table_index ( vnet_classify_main_t cm,
u32  table_index,
int  del_chain 
)

Definition at line 164 of file vnet_classify.c.

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

◆ vnet_classify_entry_alloc()

static vnet_classify_entry_t* vnet_classify_entry_alloc ( vnet_classify_table_t t,
u32  log2_pages 
)
static

Definition at line 185 of file vnet_classify.c.

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

◆ vnet_classify_entry_claim_resource()

static void vnet_classify_entry_claim_resource ( vnet_classify_entry_t e)
static

Definition at line 384 of file vnet_classify.c.

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

◆ vnet_classify_entry_free()

static void vnet_classify_entry_free ( vnet_classify_table_t t,
vnet_classify_entry_t v,
u32  log2_pages 
)
static

Definition at line 217 of file vnet_classify.c.

+ Here is the caller graph for this function:

◆ vnet_classify_entry_release_resource()

static void vnet_classify_entry_release_resource ( vnet_classify_entry_t e)
static

Definition at line 401 of file vnet_classify.c.

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

◆ vnet_classify_find_entry()

vnet_classify_entry_t* vnet_classify_find_entry ( vnet_classify_table_t t,
u8 h,
u64  hash,
f64  now 
)

Definition at line 657 of file vnet_classify.c.

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

◆ vnet_classify_init()

static clib_error_t* vnet_classify_init ( vlib_main_t vm)
static

Definition at line 3014 of file vnet_classify.c.

+ Here is the call graph for this function:

◆ vnet_classify_new_table()

vnet_classify_table_t* vnet_classify_new_table ( vnet_classify_main_t cm,
const u8 mask,
u32  nbuckets,
u32  memory_size,
u32  skip_n_vectors,
u32  match_n_vectors 
)

Definition at line 131 of file vnet_classify.c.

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

◆ vnet_classify_register_unformat_acl_next_index_fn()

void vnet_classify_register_unformat_acl_next_index_fn ( unformat_function_t fn)

Definition at line 106 of file vnet_classify.c.

+ Here is the caller graph for this function:

◆ vnet_classify_register_unformat_ip_next_index_fn()

void vnet_classify_register_unformat_ip_next_index_fn ( unformat_function_t fn)

Definition at line 98 of file vnet_classify.c.

+ Here is the caller graph for this function:

◆ vnet_classify_register_unformat_l2_next_index_fn()

void vnet_classify_register_unformat_l2_next_index_fn ( unformat_function_t fn)

Definition at line 90 of file vnet_classify.c.

+ Here is the caller graph for this function:

◆ vnet_classify_register_unformat_opaque_index_fn()

void vnet_classify_register_unformat_opaque_index_fn ( unformat_function_t fn)

Definition at line 123 of file vnet_classify.c.

+ Here is the caller graph for this function:

◆ vnet_classify_register_unformat_policer_next_index_fn()

void vnet_classify_register_unformat_policer_next_index_fn ( unformat_function_t fn)

Definition at line 114 of file vnet_classify.c.

+ Here is the caller graph for this function:

◆ vnet_is_packet_traced()

int vnet_is_packet_traced ( vlib_buffer_t b,
u32  classify_table_index,
int  func 
)

Definition at line 3042 of file vnet_classify.c.

Variable Documentation

◆ classify_filter

vlib_cli_command_t classify_filter
static
Initial value:
=
{
.path = "classify filter",
.short_help =
"classify filter <intfc> | pcap mask <mask-value> match <match-value>\n"
" | trace mask <mask-value> match <match-value> [del]\n"
" [buckets <nn>] [memory-size <n>]",
}

(constructor) VLIB_CLI_COMMAND (classify_filter)

Definition at line 2108 of file vnet_classify.c.

◆ classify_session_command

vlib_cli_command_t classify_session_command
static
Initial value:
= {
.path = "classify session",
.short_help =
"classify session [hit-next|l2-input-hit-next|l2-output-hit-next|"
"acl-hit-next <next_index>|policer-hit-next <policer_name>]"
"\n table-index <nn> match [hex] [l2] [l3 ip4] [opaque-index <index>]"
"\n [action set-ip4-fib-id|set-ip6-fib-id|set-sr-policy-index <n>] [del]",
}

(constructor) VLIB_CLI_COMMAND (classify_session_command)

Definition at line 2893 of file vnet_classify.c.

◆ classify_table

vlib_cli_command_t classify_table
static
Initial value:
=
{
.path = "classify table",
.short_help =
"classify table [miss-next|l2-miss_next|acl-miss-next <next_index>]"
"\n mask <mask-value> buckets <nn> [skip <n>] [match <n>]"
"\n [current-data-flag <n>] [current-data-offset <n>] [table <n>]"
"\n [memory-size <nn>[M][G]] [next-table <n>]"
"\n [del] [del-chain]",
}

(constructor) VLIB_CLI_COMMAND (classify_table)

Definition at line 1622 of file vnet_classify.c.

◆ show_classify_filter

vlib_cli_command_t show_classify_filter
static
Initial value:
=
{
.path = "show classify filter",
.short_help = "show classify filter [verbose [nn]]",
}

(constructor) VLIB_CLI_COMMAND (show_classify_filter)

Definition at line 2198 of file vnet_classify.c.

◆ show_classify_table_command

vlib_cli_command_t show_classify_table_command
static
Initial value:
= {
.path = "show classify tables",
.short_help = "show classify tables [index <nn>]",
}

(constructor) VLIB_CLI_COMMAND (show_classify_table_command)

Definition at line 2292 of file vnet_classify.c.

◆ vnet_classify_main

vnet_classify_main_t vnet_classify_main

Definition at line 32 of file vnet_classify.c.

dst_port
vl_api_ip_port_and_mask_t dst_port
Definition: flow_types.api:92
ip4
vl_api_ip4_address_t ip4
Definition: one.api:376
DROP
DROP
Definition: error.def:41
ttl
u8 ttl
Definition: fib_types.api:26
classify_session_command_fn
static clib_error_t * classify_session_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: vnet_classify.c:2799
classify_table_command_fn
static clib_error_t * classify_table_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: vnet_classify.c:1520
src_port
vl_api_ip_port_and_mask_t src_port
Definition: flow_types.api:91
src
vl_api_address_t src
Definition: gre.api:54
hop_limit
u8 hop_limit
Definition: tunnel_types.api:88
ip6
vl_api_ip6_address_t ip6
Definition: one.api:424
protocol
vl_api_ip_proto_t protocol
Definition: lb_types.api:72
dst
vl_api_ip4_address_t dst
Definition: pnat.api:41
length
char const int length
Definition: cJSON.h:163
classify_filter_command_fn
static clib_error_t * classify_filter_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: vnet_classify.c:1834
show_classify_tables_command_fn
static clib_error_t * show_classify_tables_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: vnet_classify.c:2244
src_address
vl_api_address_union_t src_address
Definition: ip_types.api:122
rewrite
rewrite
Definition: pnat.api:158
show_classify_filter_command_fn
static clib_error_t * show_classify_filter_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: vnet_classify.c:2120