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

Go to the source code of this file.

Data Structures

struct  pg_input_trace_t
 

Functions

static void pg_set_mbuf_metadata (pg_main_t *pg, u32 *buffers, u32 n_alloc)
 
static int validate_buffer_data2 (vlib_buffer_t *b, pg_stream_t *s, u32 data_offset, u32 n_bytes)
 
static int validate_buffer_data (vlib_buffer_t *b, pg_stream_t *s)
 
always_inline void set_1 (void *a0, u64 v0, u64 v_min, u64 v_max, u32 n_bits, u32 is_net_byte_order)
 
always_inline void set_2 (void *a0, void *a1, u64 v0, u64 v1, u64 v_min, u64 v_max, u32 n_bits, u32 is_net_byte_order, u32 is_increment)
 
static_always_inline void do_set_fixed (pg_main_t *pg, pg_stream_t *s, u32 *buffers, u32 n_buffers, u32 n_bits, u32 byte_offset, u32 is_net_byte_order, u64 v_min, u64 v_max)
 
static_always_inline u64 do_set_increment (pg_main_t *pg, pg_stream_t *s, u32 *buffers, u32 n_buffers, u32 n_bits, u32 byte_offset, u32 is_net_byte_order, u32 want_sum, u64 *sum_result, u64 v_min, u64 v_max, u64 v)
 
static_always_inline void do_set_random (pg_main_t *pg, pg_stream_t *s, u32 *buffers, u32 n_buffers, u32 n_bits, u32 byte_offset, u32 is_net_byte_order, u32 want_sum, u64 *sum_result, u64 v_min, u64 v_max)
 
always_inline void setbits_1 (void *a0, u64 v0, u64 v_min, u64 v_max, u32 max_bits, u32 n_bits, u64 mask, u32 shift)
 
always_inline void setbits_2 (void *a0, void *a1, u64 v0, u64 v1, u64 v_min, u64 v_max, u32 max_bits, u32 n_bits, u64 mask, u32 shift, u32 is_increment)
 
static_always_inline void do_setbits_fixed (pg_main_t *pg, pg_stream_t *s, u32 *buffers, u32 n_buffers, u32 max_bits, u32 n_bits, u32 byte_offset, u64 v_min, u64 v_max, u64 mask, u32 shift)
 
static_always_inline u64 do_setbits_increment (pg_main_t *pg, pg_stream_t *s, u32 *buffers, u32 n_buffers, u32 max_bits, u32 n_bits, u32 byte_offset, u64 v_min, u64 v_max, u64 v, u64 mask, u32 shift)
 
static_always_inline void do_setbits_random (pg_main_t *pg, pg_stream_t *s, u32 *buffers, u32 n_buffers, u32 max_bits, u32 n_bits, u32 byte_offset, u64 v_min, u64 v_max, u64 mask, u32 shift)
 
static u64 do_it (pg_main_t *pg, pg_stream_t *s, u32 *buffers, u32 n_buffers, u32 lo_bit, u32 hi_bit, u64 v_min, u64 v_max, u64 v, pg_edit_type_t edit_type)
 
static void pg_generate_set_lengths (pg_main_t *pg, pg_stream_t *s, u32 *buffers, u32 n_buffers)
 
static void pg_generate_fix_multi_buffer_lengths (pg_main_t *pg, pg_stream_t *s, u32 *buffers, u32 n_buffers)
 
static void pg_generate_edit (pg_main_t *pg, pg_stream_t *s, u32 *buffers, u32 n_buffers)
 
static void pg_set_next_buffer_pointers (pg_main_t *pg, pg_stream_t *s, u32 *buffers, u32 *next_buffers, u32 n_buffers)
 
static_always_inline void init_replay_buffers_inline (vlib_main_t *vm, pg_stream_t *s, u32 *buffers, u32 n_buffers, u32 data_offset, u32 n_data)
 
static_always_inline void init_buffers_inline (vlib_main_t *vm, pg_stream_t *s, u32 *buffers, u32 n_buffers, u32 data_offset, u32 n_data, u32 set_data)
 
static void pg_buffer_init (vlib_main_t *vm, vlib_buffer_free_list_t *fl, u32 *buffers, u32 n_buffers)
 
static u32 pg_stream_fill_helper (pg_main_t *pg, pg_stream_t *s, pg_buffer_index_t *bi, u32 *buffers, u32 *next_buffers, u32 n_alloc)
 
static u32 pg_stream_fill (pg_main_t *pg, pg_stream_t *s, u32 n_buffers)
 
static u8format_pg_input_trace (u8 *s, va_list *va)
 
static void pg_input_trace (pg_main_t *pg, vlib_node_runtime_t *node, pg_stream_t *s, u32 *buffers, u32 n_buffers)
 
static uword pg_generate_packets (vlib_node_runtime_t *node, pg_main_t *pg, pg_stream_t *s, uword n_packets_to_generate)
 
static uword pg_input_stream (vlib_node_runtime_t *node, pg_main_t *pg, pg_stream_t *s)
 
uword pg_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

vlib_node_registration_t pg_input_node
 (constructor) VLIB_REGISTER_NODE (pg_input_node) More...
 

Function Documentation

static u64 do_it ( pg_main_t pg,
pg_stream_t s,
u32 buffers,
u32  n_buffers,
u32  lo_bit,
u32  hi_bit,
u64  v_min,
u64  v_max,
u64  v,
pg_edit_type_t  edit_type 
)
static

Definition at line 819 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void do_set_fixed ( pg_main_t pg,
pg_stream_t s,
u32 buffers,
u32  n_buffers,
u32  n_bits,
u32  byte_offset,
u32  is_net_byte_order,
u64  v_min,
u64  v_max 
)

Definition at line 192 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline u64 do_set_increment ( pg_main_t pg,
pg_stream_t s,
u32 buffers,
u32  n_buffers,
u32  n_bits,
u32  byte_offset,
u32  is_net_byte_order,
u32  want_sum,
u64 sum_result,
u64  v_min,
u64  v_max,
u64  v 
)

Definition at line 250 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void do_set_random ( pg_main_t pg,
pg_stream_t s,
u32 buffers,
u32  n_buffers,
u32  n_bits,
u32  byte_offset,
u32  is_net_byte_order,
u32  want_sum,
u64 sum_result,
u64  v_min,
u64  v_max 
)

Definition at line 350 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void do_setbits_fixed ( pg_main_t pg,
pg_stream_t s,
u32 buffers,
u32  n_buffers,
u32  max_bits,
u32  n_bits,
u32  byte_offset,
u64  v_min,
u64  v_max,
u64  mask,
u32  shift 
)

Definition at line 555 of file input.c.

+ Here is the call graph for this function:

static_always_inline u64 do_setbits_increment ( pg_main_t pg,
pg_stream_t s,
u32 buffers,
u32  n_buffers,
u32  max_bits,
u32  n_bits,
u32  byte_offset,
u64  v_min,
u64  v_max,
u64  v,
u64  mask,
u32  shift 
)

Definition at line 613 of file input.c.

+ Here is the call graph for this function:

static_always_inline void do_setbits_random ( pg_main_t pg,
pg_stream_t s,
u32 buffers,
u32  n_buffers,
u32  max_bits,
u32  n_bits,
u32  byte_offset,
u64  v_min,
u64  v_max,
u64  mask,
u32  shift 
)

Definition at line 696 of file input.c.

+ Here is the call graph for this function:

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

Definition at line 1497 of file input.c.

+ Here is the call graph for this function:

static_always_inline void init_buffers_inline ( vlib_main_t vm,
pg_stream_t s,
u32 buffers,
u32  n_buffers,
u32  data_offset,
u32  n_data,
u32  set_data 
)

Definition at line 1191 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline void init_replay_buffers_inline ( vlib_main_t vm,
pg_stream_t s,
u32 buffers,
u32  n_buffers,
u32  data_offset,
u32  n_data 
)

Definition at line 1147 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void pg_buffer_init ( vlib_main_t vm,
vlib_buffer_free_list_t fl,
u32 buffers,
u32  n_buffers 
)
static

Definition at line 1276 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void pg_generate_edit ( pg_main_t pg,
pg_stream_t s,
u32 buffers,
u32  n_buffers 
)
static

Definition at line 1044 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void pg_generate_fix_multi_buffer_lengths ( pg_main_t pg,
pg_stream_t s,
u32 buffers,
u32  n_buffers 
)
static

Definition at line 985 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword pg_generate_packets ( vlib_node_runtime_t node,
pg_main_t pg,
pg_stream_t s,
uword  n_packets_to_generate 
)
static

Definition at line 1611 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void pg_generate_set_lengths ( pg_main_t pg,
pg_stream_t s,
u32 buffers,
u32  n_buffers 
)
static

Definition at line 928 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword pg_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 1721 of file input.c.

static uword pg_input_stream ( vlib_node_runtime_t node,
pg_main_t pg,
pg_stream_t s 
)
static

Definition at line 1670 of file input.c.

+ Here is the call graph for this function:

static void pg_input_trace ( pg_main_t pg,
vlib_node_runtime_t node,
pg_stream_t s,
u32 buffers,
u32  n_buffers 
)
static

Definition at line 1541 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void pg_set_mbuf_metadata ( pg_main_t pg,
u32 buffers,
u32  n_alloc 
)
inlinestatic

Definition at line 49 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void pg_set_next_buffer_pointers ( pg_main_t pg,
pg_stream_t s,
u32 buffers,
u32 next_buffers,
u32  n_buffers 
)
static

Definition at line 1099 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 pg_stream_fill ( pg_main_t pg,
pg_stream_t s,
u32  n_buffers 
)
static

Definition at line 1391 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 pg_stream_fill_helper ( pg_main_t pg,
pg_stream_t s,
pg_buffer_index_t bi,
u32 buffers,
u32 next_buffers,
u32  n_alloc 
)
static

Definition at line 1297 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void set_1 ( void a0,
u64  v0,
u64  v_min,
u64  v_max,
u32  n_bits,
u32  is_net_byte_order 
)

Definition at line 113 of file input.c.

+ Here is the caller graph for this function:

always_inline void set_2 ( void a0,
void a1,
u64  v0,
u64  v1,
u64  v_min,
u64  v_max,
u32  n_bits,
u32  is_net_byte_order,
u32  is_increment 
)

Definition at line 145 of file input.c.

+ Here is the caller graph for this function:

always_inline void setbits_1 ( void a0,
u64  v0,
u64  v_min,
u64  v_max,
u32  max_bits,
u32  n_bits,
u64  mask,
u32  shift 
)

Definition at line 491 of file input.c.

+ Here is the caller graph for this function:

always_inline void setbits_2 ( void a0,
void a1,
u64  v0,
u64  v1,
u64  v_min,
u64  v_max,
u32  max_bits,
u32  n_bits,
u64  mask,
u32  shift,
u32  is_increment 
)

Definition at line 518 of file input.c.

+ Here is the caller graph for this function:

static int validate_buffer_data ( vlib_buffer_t b,
pg_stream_t s 
)
static

Definition at line 109 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int validate_buffer_data2 ( vlib_buffer_t b,
pg_stream_t s,
u32  data_offset,
u32  n_bytes 
)
static

Definition at line 78 of file input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_node_registration_t pg_input_node
Initial value:
= {
.function = pg_input,
.name = "pg-input",
.format_trace = format_pg_input_trace,
.state = VLIB_NODE_STATE_DISABLED,
}
uword pg_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: input.c:1721
static u8 * format_pg_input_trace(u8 *s, va_list *va)
Definition: input.c:1497

(constructor) VLIB_REGISTER_NODE (pg_input_node)

Definition at line 1736 of file input.c.