FD.io VPP  v18.01-8-g0eacf49
Vector Packet Processing
node.c File Reference
+ Include dependency graph for node.c:

Go to the source code of this file.

Data Structures

struct  flowprobe_trace_t
 

Macros

#define foreach_flowprobe_error
 
#define FLOWPROBE_NEXT_NODES
 
#define NTP_TIMESTAMP   2208988800L
 

Enumerations

enum  flowprobe_error_t { FLOWPROBE_N_ERROR }
 
enum  flowprobe_next_t { FLOWPROBE_NEXT_DROP, FLOWPROBE_NEXT_IP4_LOOKUP, FLOWPROBE_N_NEXT }
 

Functions

static void flowprobe_export_entry (vlib_main_t *vm, flowprobe_entry_t *e)
 
static u8format_flowprobe_trace (u8 *s, va_list *args)
 
static flowprobe_variant_t flowprobe_get_variant (flowprobe_variant_t which, flowprobe_record_t flags, u16 ethertype)
 
static u32 flowprobe_common_add (vlib_buffer_t *to_b, flowprobe_entry_t *e, u16 offset)
 
static u32 flowprobe_l2_add (vlib_buffer_t *to_b, flowprobe_entry_t *e, u16 offset)
 
static u32 flowprobe_l3_ip6_add (vlib_buffer_t *to_b, flowprobe_entry_t *e, u16 offset)
 
static u32 flowprobe_l3_ip4_add (vlib_buffer_t *to_b, flowprobe_entry_t *e, u16 offset)
 
static u32 flowprobe_l4_add (vlib_buffer_t *to_b, flowprobe_entry_t *e, u16 offset)
 
static u32 flowprobe_hash (flowprobe_key_t *k)
 
flowprobe_entry_tflowprobe_lookup (u32 my_cpu_number, flowprobe_key_t *k, u32 *poolindex, bool *collision)
 
flowprobe_entry_tflowprobe_create (u32 my_cpu_number, flowprobe_key_t *k, u32 *poolindex)
 
static void add_to_flow_record_state (vlib_main_t *vm, vlib_node_runtime_t *node, flowprobe_main_t *fm, vlib_buffer_t *b, timestamp_nsec_t timestamp, u16 length, flowprobe_variant_t which, flowprobe_trace_t *t)
 
static u16 flowprobe_get_headersize (void)
 
static void flowprobe_export_send (vlib_main_t *vm, vlib_buffer_t *b0, flowprobe_variant_t which)
 
static vlib_buffer_tflowprobe_get_buffer (vlib_main_t *vm, flowprobe_variant_t which)
 
uword flowprobe_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, flowprobe_variant_t which)
 
static uword flowprobe_ip4_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword flowprobe_ip6_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword flowprobe_l2_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static void flush_record (flowprobe_variant_t which)
 
void flowprobe_flush_callback_ip4 (void)
 
void flowprobe_flush_callback_ip6 (void)
 
void flowprobe_flush_callback_l2 (void)
 
static void flowprobe_delete_by_index (u32 my_cpu_number, u32 poolindex)
 
static uword flowprobe_walker_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 

Variables

static char * flowprobe_variant_strings []
 
vlib_node_registration_t flowprobe_ip4_node
 (constructor) VLIB_REGISTER_NODE (flowprobe_ip4_node) More...
 
vlib_node_registration_t flowprobe_ip6_node
 (constructor) VLIB_REGISTER_NODE (flowprobe_ip6_node) More...
 
vlib_node_registration_t flowprobe_l2_node
 (constructor) VLIB_REGISTER_NODE (flowprobe_l2_node) More...
 
static char * flowprobe_error_strings []
 
vlib_node_registration_t flowprobe_walker_node
 (constructor) VLIB_REGISTER_NODE (flowprobe_walker_node) More...
 

Macro Definition Documentation

#define FLOWPROBE_NEXT_NODES
Value:
{ \
[FLOWPROBE_NEXT_DROP] = "error-drop", \
[FLOWPROBE_NEXT_IP4_LOOKUP] = "ip4-lookup", \
}

Definition at line 132 of file node.c.

#define foreach_flowprobe_error
Value:
_(COLLISION, "Hash table collisions") \
_(BUFFER, "Buffer allocation error") \
_(EXPORTED_PACKETS, "Exported packets") \
_(INPATH, "Exported packets in path")

Definition at line 105 of file node.c.

#define NTP_TIMESTAMP   2208988800L

Definition at line 151 of file node.c.

Enumeration Type Documentation

Enumerator
FLOWPROBE_N_ERROR 

Definition at line 111 of file node.c.

Enumerator
FLOWPROBE_NEXT_DROP 
FLOWPROBE_NEXT_IP4_LOOKUP 
FLOWPROBE_N_NEXT 

Definition at line 125 of file node.c.

Function Documentation

static void add_to_flow_record_state ( vlib_main_t vm,
vlib_node_runtime_t node,
flowprobe_main_t fm,
vlib_buffer_t b,
timestamp_nsec_t  timestamp,
u16  length,
flowprobe_variant_t  which,
flowprobe_trace_t t 
)
inlinestatic

Definition at line 359 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 flowprobe_common_add ( vlib_buffer_t to_b,
flowprobe_entry_t e,
u16  offset 
)
inlinestatic

Definition at line 154 of file node.c.

+ Here is the caller graph for this function:

flowprobe_entry_t* flowprobe_create ( u32  my_cpu_number,
flowprobe_key_t k,
u32 poolindex 
)

Definition at line 333 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void flowprobe_delete_by_index ( u32  my_cpu_number,
u32  poolindex 
)
static

Definition at line 907 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void flowprobe_export_entry ( vlib_main_t vm,
flowprobe_entry_t e 
)
static

Definition at line 671 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void flowprobe_export_send ( vlib_main_t vm,
vlib_buffer_t b0,
flowprobe_variant_t  which 
)
static

Definition at line 517 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void flowprobe_flush_callback_ip4 ( void  )

Definition at line 886 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void flowprobe_flush_callback_ip6 ( void  )

Definition at line 892 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void flowprobe_flush_callback_l2 ( void  )

Definition at line 898 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static vlib_buffer_t* flowprobe_get_buffer ( vlib_main_t vm,
flowprobe_variant_t  which 
)
static

Definition at line 628 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u16 flowprobe_get_headersize ( void  )
static

Definition at line 510 of file node.c.

+ Here is the caller graph for this function:

static flowprobe_variant_t flowprobe_get_variant ( flowprobe_variant_t  which,
flowprobe_record_t  flags,
u16  ethertype 
)
inlinestatic

Definition at line 138 of file node.c.

+ Here is the caller graph for this function:

static u32 flowprobe_hash ( flowprobe_key_t k)
inlinestatic

Definition at line 286 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 856 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 863 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 flowprobe_l2_add ( vlib_buffer_t to_b,
flowprobe_entry_t e,
u16  offset 
)
inlinestatic

Definition at line 193 of file node.c.

+ Here is the caller graph for this function:

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

Definition at line 870 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 flowprobe_l3_ip4_add ( vlib_buffer_t to_b,
flowprobe_entry_t e,
u16  offset 
)
inlinestatic

Definition at line 239 of file node.c.

+ Here is the caller graph for this function:

static u32 flowprobe_l3_ip6_add ( vlib_buffer_t to_b,
flowprobe_entry_t e,
u16  offset 
)
inlinestatic

Definition at line 213 of file node.c.

+ Here is the caller graph for this function:

static u32 flowprobe_l4_add ( vlib_buffer_t to_b,
flowprobe_entry_t e,
u16  offset 
)
inlinestatic

Definition at line 265 of file node.c.

+ Here is the caller graph for this function:

flowprobe_entry_t* flowprobe_lookup ( u32  my_cpu_number,
flowprobe_key_t k,
u32 poolindex,
bool collision 
)

Definition at line 306 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword flowprobe_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
flowprobe_variant_t  which 
)

Definition at line 722 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword flowprobe_walker_process ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f 
)
static

Definition at line 927 of file node.c.

+ Here is the call graph for this function:

static void flush_record ( flowprobe_variant_t  which)
inlinestatic

Definition at line 877 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 71 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

char* flowprobe_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_flowprobe_error
Definition: node.c:105

Definition at line 119 of file node.c.

vlib_node_registration_t flowprobe_ip4_node
Initial value:
= {
.function = flowprobe_ip4_node_fn,
.name = "flowprobe-ip4",
.vector_size = sizeof (u32),
.format_trace = format_flowprobe_trace,
.error_strings = flowprobe_error_strings,
.n_next_nodes = FLOWPROBE_N_NEXT,
.next_nodes = FLOWPROBE_NEXT_NODES,
}
static char * flowprobe_error_strings[]
Definition: node.c:119
static uword flowprobe_ip4_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: node.c:856
#define FLOWPROBE_NEXT_NODES
Definition: node.c:132
static u8 * format_flowprobe_trace(u8 *s, va_list *args)
Definition: node.c:71
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (flowprobe_ip4_node)

Definition at line 100 of file node.c.

vlib_node_registration_t flowprobe_ip6_node
Initial value:
= {
.function = flowprobe_ip6_node_fn,
.name = "flowprobe-ip6",
.vector_size = sizeof (u32),
.format_trace = format_flowprobe_trace,
.error_strings = flowprobe_error_strings,
.n_next_nodes = FLOWPROBE_N_NEXT,
.next_nodes = FLOWPROBE_NEXT_NODES,
}
static char * flowprobe_error_strings[]
Definition: node.c:119
static uword flowprobe_ip6_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: node.c:863
#define FLOWPROBE_NEXT_NODES
Definition: node.c:132
static u8 * format_flowprobe_trace(u8 *s, va_list *args)
Definition: node.c:71
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (flowprobe_ip6_node)

Definition at line 101 of file node.c.

vlib_node_registration_t flowprobe_l2_node
Initial value:
= {
.function = flowprobe_l2_node_fn,
.name = "flowprobe-l2",
.vector_size = sizeof (u32),
.format_trace = format_flowprobe_trace,
.error_strings = flowprobe_error_strings,
.n_next_nodes = FLOWPROBE_N_NEXT,
.next_nodes = FLOWPROBE_NEXT_NODES,
}
static char * flowprobe_error_strings[]
Definition: node.c:119
#define FLOWPROBE_NEXT_NODES
Definition: node.c:132
static u8 * format_flowprobe_trace(u8 *s, va_list *args)
Definition: node.c:71
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
static uword flowprobe_l2_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: node.c:870

(constructor) VLIB_REGISTER_NODE (flowprobe_l2_node)

Definition at line 102 of file node.c.

char* flowprobe_variant_strings[]
static
Initial value:

Definition at line 61 of file node.c.

vlib_node_registration_t flowprobe_walker_node
Initial value:
= {
.name = "flowprobe-walker",
.state = VLIB_NODE_STATE_INTERRUPT,
}
static uword flowprobe_walker_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: node.c:927

(constructor) VLIB_REGISTER_NODE (flowprobe_walker_node)

Definition at line 1039 of file node.c.