FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
builtin_client.c File Reference
+ Include dependency graph for builtin_client.c:

Go to the source code of this file.

Macros

#define TCP_BUILTIN_CLIENT_DBG   (0)
 
#define CLI_OUTPUT(_fmt, _args...)
 

Functions

static void signal_evt_to_cli_i (int *code)
 
static void signal_evt_to_cli (int code)
 
static void send_test_chunk (tclient_main_t *tm, session_t *s)
 
static void receive_test_chunk (tclient_main_t *tm, session_t *s)
 
static uword builtin_client_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static int create_api_loopback (tclient_main_t *tm)
 
static int tcp_test_clients_init (vlib_main_t *vm)
 
static int builtin_session_connected_callback (u32 app_index, u32 api_context, stream_session_t *s, u8 is_fail)
 
static void builtin_session_reset_callback (stream_session_t *s)
 
static int builtin_session_create_callback (stream_session_t *s)
 
static void builtin_session_disconnect_callback (stream_session_t *s)
 
static int builtin_server_rx_callback (stream_session_t *s)
 
static clib_error_tattach_builtin_test_clients_app (u8 *appns_id, u64 appns_flags, u64 appns_secret)
 
static void * tclient_thread_fn (void *arg)
 
int start_tx_pthread (tclient_main_t *tm)
 Start a transmit thread. More...
 
clib_error_tclients_connect (vlib_main_t *vm, u8 *uri, u32 n_clients)
 
static clib_error_ttest_tcp_clients_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
clib_error_ttcp_test_clients_main_init (vlib_main_t *vm)
 

Variables

tclient_main_t tclient_main
 
vlib_node_registration_t builtin_client_node
 (constructor) VLIB_REGISTER_NODE (builtin_client_node) More...
 
static session_cb_vft_t builtin_clients
 
static vlib_cli_command_t test_clients_command
 (constructor) VLIB_CLI_COMMAND (test_clients_command) More...
 

Macro Definition Documentation

#define CLI_OUTPUT (   _fmt,
  _args... 
)
Value:
if (!tm->no_output) \
vlib_cli_output(vm, _fmt, ##_args)
vlib_main_t * vm
Definition: buffer.c:283
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
Definition: cli.c:680

Definition at line 533 of file builtin_client.c.

#define TCP_BUILTIN_CLIENT_DBG   (0)

Definition at line 28 of file builtin_client.c.

Function Documentation

static clib_error_t* attach_builtin_test_clients_app ( u8 appns_id,
u64  appns_flags,
u64  appns_secret 
)
static

Definition at line 429 of file builtin_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 173 of file builtin_client.c.

+ Here is the call graph for this function:

static int builtin_server_rx_callback ( stream_session_t s)
static

Definition at line 413 of file builtin_client.c.

static int builtin_session_connected_callback ( u32  app_index,
u32  api_context,
stream_session_t s,
u8  is_fail 
)
static

Definition at line 336 of file builtin_client.c.

+ Here is the call graph for this function:

static int builtin_session_create_callback ( stream_session_t s)
static

Definition at line 396 of file builtin_client.c.

static void builtin_session_disconnect_callback ( stream_session_t s)
static

Definition at line 402 of file builtin_client.c.

+ Here is the call graph for this function:

static void builtin_session_reset_callback ( stream_session_t s)
static

Definition at line 387 of file builtin_client.c.

+ Here is the call graph for this function:

clib_error_t* clients_connect ( vlib_main_t vm,
u8 uri,
u32  n_clients 
)

Definition at line 502 of file builtin_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int create_api_loopback ( tclient_main_t tm)
static

Definition at line 292 of file builtin_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void receive_test_chunk ( tclient_main_t tm,
session_t s 
)
static

Definition at line 112 of file builtin_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_test_chunk ( tclient_main_t tm,
session_t s 
)
static

Definition at line 49 of file builtin_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void signal_evt_to_cli ( int  code)
static

Definition at line 39 of file builtin_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void signal_evt_to_cli_i ( int *  code)
static

Definition at line 31 of file builtin_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int start_tx_pthread ( tclient_main_t tm)

Start a transmit thread.

Definition at line 485 of file builtin_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void* tclient_thread_fn ( void *  arg)
static

Definition at line 478 of file builtin_client.c.

+ Here is the caller graph for this function:

static int tcp_test_clients_init ( vlib_main_t vm)
static

Definition at line 305 of file builtin_client.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* tcp_test_clients_main_init ( vlib_main_t vm)

Definition at line 809 of file builtin_client.c.

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

Definition at line 538 of file builtin_client.c.

+ Here is the call graph for this function:

Variable Documentation

vlib_node_registration_t builtin_client_node
Initial value:
=
{
.name = "builtin-tcp-client",
.state = VLIB_NODE_STATE_DISABLED,
}
static uword builtin_client_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)

(constructor) VLIB_REGISTER_NODE (builtin_client_node)

Definition at line 282 of file builtin_client.c.

session_cb_vft_t builtin_clients
static
Initial value:
= {
.session_reset_callback = builtin_session_reset_callback,
.session_connected_callback = builtin_session_connected_callback,
.session_accept_callback = builtin_session_create_callback,
.session_disconnect_callback = builtin_session_disconnect_callback,
.builtin_server_rx_callback = builtin_server_rx_callback
}
static int builtin_session_connected_callback(u32 app_index, u32 api_context, stream_session_t *s, u8 is_fail)
static void builtin_session_disconnect_callback(stream_session_t *s)
static void builtin_session_reset_callback(stream_session_t *s)
static int builtin_session_create_callback(stream_session_t *s)
static int builtin_server_rx_callback(stream_session_t *s)

Definition at line 419 of file builtin_client.c.

tclient_main_t tclient_main

Definition at line 26 of file builtin_client.c.

vlib_cli_command_t test_clients_command
static
Initial value:
=
{
.path = "test tcp clients",
.short_help = "test tcp clients [nclients %d] [[m|g]bytes <bytes>] "
"[test-timeout <time>][syn-timeout <time>][no-return][fifo-size <size>]"
"[private-segment-count <count>][private-segment-size <bytes>[m|g]]"
"[preallocate-fifos][preallocate-sessions][client-batch <batch-size>]"
"[uri <tcp://ip/port>][test-bytes][no-output]",
.is_mp_safe = 1,
}
static clib_error_t * test_tcp_clients_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (test_clients_command)

Definition at line 795 of file builtin_client.c.