|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
40 #ifndef included_vlib_pg_h
41 #define included_vlib_pg_h
104 #define PG_STREAM_FLAGS_IS_ENABLED (1 << 0)
240 int n_edit_bytes,
int n_packet_bytes,
u32 * group_index)
250 n_edits = n_edit_bytes /
sizeof (
pg_edit_t);
266 n_edits = n_edit_bytes /
sizeof (
pg_edit_t);
377 u8 gso_enabled,
u32 gso_size,
378 u8 coalesce_enabled);
390 void *fixed_packet_data,
391 void *fixed_packet_data_mask);
void pg_interface_enable_disable_coalesce(pg_interface_t *pi, u8 enable, u32 tx_node_index)
mac_address_t * allowed_mcast_macs
pg_edit_group_t * edit_groups
vnet_device_class_t pg_dev_class
pg_edit_type_t packet_size_edit_type
void pg_edit_group_get_fixed_packet_data(pg_stream_t *s, u32 group_index, void *fixed_packet_data, void *fixed_packet_data_mask)
struct _vnet_device_class vnet_device_class_t
static uword pg_edit_group_n_bytes(pg_stream_t *s, u32 group_index)
void pg_stream_del(pg_main_t *pg, uword index)
void pg_enable_disable(u32 stream_index, int is_enable)
u8 * fixed_packet_data_mask
#define vec_end(v)
End (last data address) of vector.
u32 pg_interface_add_or_get(pg_main_t *pg, uword stream_index, u8 gso_enabled, u32 gso_size, u8 coalesce_enabled)
u64 * replay_packet_timestamps
u32 ** replay_buffers_by_thread
void pg_stream_change(pg_main_t *pg, pg_stream_t *s)
PCAP main state data structure.
uword() vlib_node_function_t(struct vlib_main_t *vm, struct vlib_node_runtime_t *node, struct vlib_frame_t *frame)
gro_flow_table_t * flow_table
void pg_stream_enable_disable(pg_main_t *pg, pg_stream_t *s, int is_enable)
uword edit_function_opaque
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
clib_error_t * pg_capture(pg_capture_args_t *a)
unformat_function_t * unformat_edit
pg_buffer_index_t * buffer_indices
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
u32 sw_if_index[VLIB_N_RX_TX]
static void pg_stream_free(pg_stream_t *s)
static pg_node_t * pg_get_node(uword node_index)
static void * pg_get_edit_group(pg_stream_t *s, u32 group_index)
f64 rate_packets_per_second
PCAP utility definitions.
void pg_stream_add(pg_main_t *pg, pg_stream_t *s_init)
sll srl srl sll sra u16x4 i
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
#define PG_STREAM_FLAGS_IS_ENABLED
uword * if_index_by_if_id
static pg_edit_group_t * pg_stream_get_group(pg_stream_t *s, u32 group_index)
static void pg_free_edit_group(pg_stream_t *s)
struct _vlib_node_registration vlib_node_registration_t
uword * if_id_by_sw_if_index
vlib_node_function_t pg_output
#define vec_free(V)
Free vector's memory (no header).
pg_interface_t * interfaces
uword * stream_index_by_name
pg_edit_t * non_fixed_edits
static void * pg_create_edit_group(pg_stream_t *s, int n_edit_bytes, int n_packet_bytes, u32 *group_index)
vlib_node_registration_t pg_input_node
(constructor) VLIB_REGISTER_NODE (pg_input_node)
static void * pg_add_edits(pg_stream_t *s, int n_edit_bytes, int n_packet_bytes, u32 group_index)
#define vec_foreach(var, vec)
Vector iterator.
struct pg_edit_group_t pg_edit_group_t
#define vec_resize(V, N)
Resize a vector (no header, unspecified alignment) Add N elements to end of given vector V,...
struct pg_stream_t pg_stream_t
u32 last_increment_packet_size
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
pg_edit_t * non_fixed_edits
u8 ** replay_packet_templates
static void pg_edit_free(pg_edit_t *e)
static void pg_edit_group_free(pg_edit_group_t *g)
#define clib_fifo_free(f)
u8 * fixed_packet_data_mask
void(* edit_function)(struct pg_main_t *pg, struct pg_stream_t *s, struct pg_edit_group_t *g, u32 *buffers, u32 n_buffers)
static void pg_buffer_index_free(pg_buffer_index_t *bi)
static int pg_stream_is_enabled(pg_stream_t *s)
u32 current_replay_packet_index
struct pg_main_t pg_main_t
VLIB buffer representation.
vlib_node_function_t pg_input