FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
echo_client.c File Reference
+ Include dependency graph for echo_client.c:

Go to the source code of this file.

Macros

#define ECHO_CLIENT_DBG   (0)
 
#define DBG(_fmt, _args...)
 
#define ec_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_data_chunk (echo_client_main_t *ecm, eclient_session_t *s)
 
static void receive_data_chunk (echo_client_main_t *ecm, eclient_session_t *s)
 
static uword echo_client_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static int echo_clients_init (vlib_main_t *vm)
 
static int quic_echo_clients_qsession_connected_callback (u32 app_index, u32 api_context, session_t *s, session_error_t err)
 
static int quic_echo_clients_session_connected_callback (u32 app_index, u32 api_context, session_t *s, session_error_t err)
 
static int echo_clients_session_connected_callback (u32 app_index, u32 api_context, session_t *s, session_error_t err)
 
static void echo_clients_session_reset_callback (session_t *s)
 
static int echo_clients_session_create_callback (session_t *s)
 
static void echo_clients_session_disconnect_callback (session_t *s)
 
void echo_clients_session_disconnect (session_t *s)
 
static int echo_clients_rx_callback (session_t *s)
 
int echo_client_add_segment_callback (u32 client_index, u64 segment_handle)
 
static clib_error_techo_clients_attach (u8 *appns_id, u64 appns_flags, u64 appns_secret)
 
static int echo_clients_detach ()
 
static void * echo_client_thread_fn (void *arg)
 
int echo_clients_start_tx_pthread (echo_client_main_t *ecm)
 Start a transmit thread. More...
 
static int echo_client_transport_needs_crypto (transport_proto_t proto)
 
clib_error_techo_clients_connect (vlib_main_t *vm, u32 n_clients)
 
static clib_error_techo_clients_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
clib_error_techo_clients_main_init (vlib_main_t *vm)
 

Variables

echo_client_main_t echo_client_main
 
vlib_node_registration_t echo_clients_node
 (constructor) VLIB_REGISTER_NODE (echo_clients_node) More...
 
static session_cb_vft_t echo_clients
 
static vlib_cli_command_t echo_clients_command
 (constructor) VLIB_CLI_COMMAND (echo_clients_command) More...
 

Macro Definition Documentation

◆ DBG

#define DBG (   _fmt,
  _args... 
)
Value:
clib_warning (_fmt, ##_args)

Definition at line 26 of file echo_client.c.

◆ ec_cli_output

#define ec_cli_output (   _fmt,
  _args... 
)
Value:
if (!ecm->no_output) \
vlib_cli_output(vm, _fmt, ##_args)

Definition at line 774 of file echo_client.c.

◆ ECHO_CLIENT_DBG

#define ECHO_CLIENT_DBG   (0)

Definition at line 25 of file echo_client.c.

Function Documentation

◆ echo_client_add_segment_callback()

int echo_client_add_segment_callback ( u32  client_index,
u64  segment_handle 
)

Definition at line 603 of file echo_client.c.

◆ echo_client_node_fn()

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

Definition at line 205 of file echo_client.c.

+ Here is the call graph for this function:

◆ echo_client_thread_fn()

static void* echo_client_thread_fn ( void *  arg)
static

Definition at line 698 of file echo_client.c.

+ Here is the caller graph for this function:

◆ echo_client_transport_needs_crypto()

static int echo_client_transport_needs_crypto ( transport_proto_t  proto)
static

Definition at line 722 of file echo_client.c.

+ Here is the caller graph for this function:

◆ echo_clients_attach()

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

Definition at line 621 of file echo_client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ echo_clients_command_fn()

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

Definition at line 779 of file echo_client.c.

+ Here is the call graph for this function:

◆ echo_clients_connect()

clib_error_t* echo_clients_connect ( vlib_main_t vm,
u32  n_clients 
)

Definition at line 729 of file echo_client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ echo_clients_detach()

static int echo_clients_detach ( )
static

Definition at line 681 of file echo_client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ echo_clients_init()

static int echo_clients_init ( vlib_main_t vm)
static

Definition at line 322 of file echo_client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ echo_clients_main_init()

clib_error_t* echo_clients_main_init ( vlib_main_t vm)

Definition at line 1095 of file echo_client.c.

◆ echo_clients_rx_callback()

static int echo_clients_rx_callback ( session_t s)
static

Definition at line 579 of file echo_client.c.

+ Here is the call graph for this function:

◆ echo_clients_session_connected_callback()

static int echo_clients_session_connected_callback ( u32  app_index,
u32  api_context,
session_t s,
session_error_t  err 
)
static

Definition at line 470 of file echo_client.c.

+ Here is the call graph for this function:

◆ echo_clients_session_create_callback()

static int echo_clients_session_create_callback ( session_t s)
static

Definition at line 552 of file echo_client.c.

◆ echo_clients_session_disconnect()

void echo_clients_session_disconnect ( session_t s)

Definition at line 569 of file echo_client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ echo_clients_session_disconnect_callback()

static void echo_clients_session_disconnect_callback ( session_t s)
static

Definition at line 558 of file echo_client.c.

+ Here is the call graph for this function:

◆ echo_clients_session_reset_callback()

static void echo_clients_session_reset_callback ( session_t s)
static

Definition at line 537 of file echo_client.c.

+ Here is the call graph for this function:

◆ echo_clients_start_tx_pthread()

int echo_clients_start_tx_pthread ( echo_client_main_t ecm)

Start a transmit thread.

Definition at line 705 of file echo_client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_echo_clients_qsession_connected_callback()

static int quic_echo_clients_qsession_connected_callback ( u32  app_index,
u32  api_context,
session_t s,
session_error_t  err 
)
static

Definition at line 351 of file echo_client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_echo_clients_session_connected_callback()

static int quic_echo_clients_session_connected_callback ( u32  app_index,
u32  api_context,
session_t s,
session_error_t  err 
)
static

Definition at line 396 of file echo_client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ receive_data_chunk()

static void receive_data_chunk ( echo_client_main_t ecm,
eclient_session_t s 
)
static

Definition at line 143 of file echo_client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ send_data_chunk()

static void send_data_chunk ( echo_client_main_t ecm,
eclient_session_t s 
)
static

Definition at line 49 of file echo_client.c.

+ Here is the call graph for this function:

◆ signal_evt_to_cli()

static void signal_evt_to_cli ( int  code)
static

Definition at line 39 of file echo_client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ signal_evt_to_cli_i()

static void signal_evt_to_cli_i ( int *  code)
static

Definition at line 31 of file echo_client.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ echo_client_main

echo_client_main_t echo_client_main

Definition at line 23 of file echo_client.c.

◆ echo_clients

session_cb_vft_t echo_clients
static
Initial value:
= {
.session_reset_callback = echo_clients_session_reset_callback,
.session_connected_callback = echo_clients_session_connected_callback,
.session_accept_callback = echo_clients_session_create_callback,
.session_disconnect_callback = echo_clients_session_disconnect_callback,
.builtin_app_rx_callback = echo_clients_rx_callback,
.add_segment_callback = echo_client_add_segment_callback
}

Definition at line 610 of file echo_client.c.

◆ echo_clients_command

vlib_cli_command_t echo_clients_command
static
Initial value:
=
{
.path = "test echo clients",
.short_help = "test echo 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,
}

(constructor) VLIB_CLI_COMMAND (echo_clients_command)

Definition at line 1081 of file echo_client.c.

◆ echo_clients_node

vlib_node_registration_t echo_clients_node
Initial value:
=
{
.function = echo_client_node_fn,
.name = "echo-clients",
.state = VLIB_NODE_STATE_DISABLED,
}

(constructor) VLIB_REGISTER_NODE (echo_clients_node)

Definition at line 312 of file echo_client.c.

ECHO_CLIENT_DBG
#define ECHO_CLIENT_DBG
Definition: echo_client.c:25
echo_clients_session_disconnect_callback
static void echo_clients_session_disconnect_callback(session_t *s)
Definition: echo_client.c:558
echo_clients_session_connected_callback
static int echo_clients_session_connected_callback(u32 app_index, u32 api_context, session_t *s, session_error_t err)
Definition: echo_client.c:470
VLIB_NODE_TYPE_INPUT
@ VLIB_NODE_TYPE_INPUT
Definition: node.h:76
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
echo_client_node_fn
static uword echo_client_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: echo_client.c:205
echo_client_add_segment_callback
int echo_client_add_segment_callback(u32 client_index, u64 segment_handle)
Definition: echo_client.c:603
echo_clients_session_create_callback
static int echo_clients_session_create_callback(session_t *s)
Definition: echo_client.c:552
echo_clients_command_fn
static clib_error_t * echo_clients_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: echo_client.c:779
echo_clients_session_reset_callback
static void echo_clients_session_reset_callback(session_t *s)
Definition: echo_client.c:537
echo_clients_rx_callback
static int echo_clients_rx_callback(session_t *s)
Definition: echo_client.c:579