X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fpg%2Fpg.h;h=55bc75dc2825061bd47062e206feb5d3ea62caf3;hb=db86329ab;hp=99652b43981259b21f83bf5e08ac47e605e23513;hpb=3ae2873e568dd441a22903ab9f8c7954835b0bf1;p=vpp.git diff --git a/src/vnet/pg/pg.h b/src/vnet/pg/pg.h index 99652b43981..55bc75dc282 100644 --- a/src/vnet/pg/pg.h +++ b/src/vnet/pg/pg.h @@ -89,8 +89,6 @@ typedef struct /* Buffers pre-initialized with fixed buffer data for this stream. */ u32 *buffer_fifo; - /* Buffer free list for this buffer index in stream. */ - vlib_buffer_free_list_index_t free_list_index; } pg_buffer_index_t; typedef struct pg_stream_t @@ -102,7 +100,6 @@ typedef struct pg_stream_t /* Stream is currently enabled. */ #define PG_STREAM_FLAGS_IS_ENABLED (1 << 0) -#define PG_STREAM_FLAGS_DISABLE_BUFFER_RECYCLE (1 << 1) /* Edit groups are created by each protocol level (e.g. ethernet, ip4, tcp, ...). */ @@ -158,6 +155,9 @@ typedef struct pg_stream_t Zero means no packet limit. */ u64 n_packets_limit; + /* Only generate up to n_max_frame per frame. */ + u32 n_max_frame; + /* Rate for this stream in packets/second. Zero means unlimited rate. */ f64 rate_packets_per_second; @@ -302,8 +302,10 @@ typedef struct /* Identifies stream for this interface. */ u32 id; + u8 gso_enabled; + u32 gso_size; pcap_main_t pcap_main; - u8 *pcap_file_name; + char *pcap_file_name; } pg_interface_t; /* Per VLIB node data. */ @@ -328,6 +330,9 @@ typedef struct pg_main_t pg_interface_t *interfaces; uword *if_index_by_if_id; + /* Vector of buffer indices for use in pg_stream_fill_replay, per thread */ + u32 **replay_buffers_by_thread; + /* Per VLIB node information. */ pg_node_t *nodes; } pg_main_t; @@ -344,13 +349,15 @@ vlib_node_function_t pg_input, pg_output; /* Stream add/delete. */ void pg_stream_del (pg_main_t * pg, uword index); void pg_stream_add (pg_main_t * pg, pg_stream_t * s_init); +void pg_stream_change (pg_main_t * pg, pg_stream_t * s); /* Enable/disable stream. */ void pg_stream_enable_disable (pg_main_t * pg, pg_stream_t * s, int is_enable); /* Find/create free packet-generator interface index. */ -u32 pg_interface_add_or_get (pg_main_t * pg, uword stream_index); +u32 pg_interface_add_or_get (pg_main_t * pg, uword stream_index, + u8 gso_enabled, u32 gso_size); always_inline pg_node_t * pg_get_node (uword node_index) @@ -372,7 +379,7 @@ typedef struct u32 hw_if_index; u32 dev_instance; u8 is_enabled; - u8 *pcap_file_name; + char *pcap_file_name; u32 count; } pg_capture_args_t;