FD.io VPP  v19.08-27-gf4dcae4
Vector Packet Processing
quic_echo.c File Reference
+ Include dependency graph for quic_echo.c:

Go to the source code of this file.

Macros

#define foreach_quic_echo_msg
 

Functions

u8format_quic_echo_state (u8 *s, va_list *args)
 
static uword unformat_close (unformat_input_t *input, va_list *args)
 
static uword echo_unformat_timing_event (unformat_input_t *input, va_list *args)
 
u8echo_format_timing_event (u8 *s, va_list *args)
 
static void echo_session_prealloc (echo_main_t *em)
 
static echo_session_techo_session_new (echo_main_t *em)
 
static int echo_send_rpc (echo_main_t *em, void *fp, void *arg, u32 opaque)
 
static void echo_segment_handle_add_del (echo_main_t *em, u64 segment_handle, u8 add)
 
static void echo_session_handle_add_del (echo_main_t *em, u64 handle, u32 sid)
 
static echo_session_techo_get_session_from_handle (echo_main_t *em, u64 handle)
 
void application_send_attach (echo_main_t *em)
 
void application_detach (echo_main_t *em)
 
static void server_send_listen (echo_main_t *em)
 
static void server_send_unbind (echo_main_t *em)
 
static void echo_send_connect (u8 *uri, u32 opaque)
 
static void echo_disconnect_session (echo_session_t *s, u32 opaque)
 
static int wait_for_segment_allocation (u64 segment_handle)
 
static void quic_echo_notify_event (echo_main_t *em, echo_test_evt_t e)
 
static void echo_assert_test_suceeded (echo_main_t *em)
 
static void echo_session_dequeue_notify (echo_session_t *s)
 
static int ssvm_segment_attach (char *name, ssvm_segment_type_t type, int fd)
 
static void stop_signal (int signum)
 
int connect_to_vpp (char *name)
 
static void session_print_stats (echo_main_t *em, echo_session_t *session)
 
static void echo_event_didnt_happen (u8 e)
 
static void print_global_json_stats (echo_main_t *em)
 
static void print_global_stats (echo_main_t *em)
 
static void echo_free_sessions (echo_main_t *em)
 
static void echo_cleanup_session (echo_main_t *em, echo_session_t *s)
 
static void echo_initiate_qsession_close_no_stream (echo_main_t *em)
 
static void test_recv_bytes (echo_main_t *em, echo_session_t *s, u8 *rx_buf, u32 n_read)
 
static int recv_data_chunk (echo_main_t *em, echo_session_t *s, u8 *rx_buf)
 
static int send_data_chunk (echo_session_t *s, u8 *tx_buf, int offset, int len)
 
static int mirror_data_chunk (echo_main_t *em, echo_session_t *s, u8 *tx_buf, u64 len)
 
static void echo_update_count_on_session_close (echo_main_t *em, echo_session_t *s)
 
static void echo_check_closed_listener (echo_main_t *em, echo_session_t *s)
 
static void echo_handle_data (echo_main_t *em, echo_session_t *s, u8 *rx_buf)
 
static void * echo_data_thread_fn (void *arg)
 
static void session_bound_handler (session_bound_msg_t *mp)
 
static void session_accepted_handler (session_accepted_msg_t *mp)
 
static void session_connected_handler (session_connected_msg_t *mp)
 
static void echo_on_connected_connect (session_connected_msg_t *mp, u32 session_index)
 
static void echo_on_connected_send (session_connected_msg_t *mp, u32 session_index)
 
static void echo_on_connected_error (session_connected_msg_t *mp, u32 session_index)
 
static void echo_on_accept_recv (session_accepted_msg_t *mp, u32 session_index)
 
static void echo_on_accept_connect (session_accepted_msg_t *mp, u32 session_index)
 
static void echo_on_accept_error (session_accepted_msg_t *mp, u32 session_index)
 
static void echo_on_accept_log_ip (session_accepted_msg_t *mp, u32 session_index)
 
static uword echo_unformat_quic_setup_vft (unformat_input_t *input, va_list *args)
 
static void session_disconnected_handler (session_disconnected_msg_t *mp)
 
static void session_reset_handler (session_reset_msg_t *mp)
 
static void handle_mq_event (session_event_t *e)
 
static int wait_for_state_change (echo_main_t *em, connection_state_t state, f64 timeout)
 
static void echo_process_rpcs (echo_main_t *em)
 
static void * echo_mq_thread_fn (void *arg)
 
static void clients_run (echo_main_t *em)
 
static void server_run (echo_main_t *em)
 
static void vl_api_application_attach_reply_t_handler (vl_api_application_attach_reply_t *mp)
 
static void vl_api_application_detach_reply_t_handler (vl_api_application_detach_reply_t *mp)
 
static void vl_api_unmap_segment_t_handler (vl_api_unmap_segment_t *mp)
 
static void vl_api_map_another_segment_t_handler (vl_api_map_another_segment_t *mp)
 
static void vl_api_bind_uri_reply_t_handler (vl_api_bind_uri_reply_t *mp)
 
static void vl_api_unbind_uri_reply_t_handler (vl_api_unbind_uri_reply_t *mp)
 
static void vl_api_disconnect_session_reply_t_handler (vl_api_disconnect_session_reply_t *mp)
 
static void vl_api_application_tls_cert_add_reply_t_handler (vl_api_application_tls_cert_add_reply_t *mp)
 
static void vl_api_application_tls_key_add_reply_t_handler (vl_api_application_tls_key_add_reply_t *mp)
 
static void vl_api_connect_uri_reply_t_handler (vl_api_connect_uri_reply_t *mp)
 
void quic_echo_api_hookup (echo_main_t *em)
 
static void print_usage_and_exit (void)
 
void quic_echo_process_opts (int argc, char **argv)
 
int main (int argc, char **argv)
 

Variables

echo_main_t echo_main
 
static const quic_echo_cb_vft_t default_cb_vft
 
static const quic_echo_cb_vft_t server_stream_cb_vft
 

Macro Definition Documentation

#define foreach_quic_echo_msg
Value:
_(BIND_URI_REPLY, bind_uri_reply) \
_(UNBIND_URI_REPLY, unbind_uri_reply) \
_(DISCONNECT_SESSION_REPLY, disconnect_session_reply) \
_(APPLICATION_ATTACH_REPLY, application_attach_reply) \
_(APPLICATION_DETACH_REPLY, application_detach_reply) \
_(MAP_ANOTHER_SEGMENT, map_another_segment) \
_(UNMAP_SEGMENT, unmap_segment) \
_(APPLICATION_TLS_CERT_ADD_REPLY, application_tls_cert_add_reply) \
_(APPLICATION_TLS_KEY_ADD_REPLY, application_tls_key_add_reply) \
_(CONNECT_URI_REPLY, connect_uri_reply) \

Definition at line 1586 of file quic_echo.c.

Function Documentation

void application_detach ( echo_main_t em)

Definition at line 276 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void application_send_attach ( echo_main_t em)

Definition at line 226 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void clients_run ( echo_main_t em)
static

Definition at line 1312 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int connect_to_vpp ( char *  name)

Definition at line 438 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_assert_test_suceeded ( echo_main_t em)
static

Definition at line 385 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_check_closed_listener ( echo_main_t em,
echo_session_t s 
)
inlinestatic

Definition at line 727 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_cleanup_session ( echo_main_t em,
echo_session_t s 
)
static

Definition at line 583 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void* echo_data_thread_fn ( void *  arg)
static

Definition at line 799 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_disconnect_session ( echo_session_t s,
u32  opaque 
)
static

Definition at line 331 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_event_didnt_happen ( u8  e)
static

Definition at line 482 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* echo_format_timing_event ( u8 s,
va_list *  args 
)

Definition at line 95 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_free_sessions ( echo_main_t em)
static

Definition at line 558 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static echo_session_t* echo_get_session_from_handle ( echo_main_t em,
u64  handle 
)
inlinestatic

Definition at line 205 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_handle_data ( echo_main_t em,
echo_session_t s,
u8 rx_buf 
)
static

Definition at line 746 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_initiate_qsession_close_no_stream ( echo_main_t em)
static

Definition at line 616 of file quic_echo.c.

+ Here is the caller graph for this function:

static void* echo_mq_thread_fn ( void *  arg)
static

Definition at line 1275 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_on_accept_connect ( session_accepted_msg_t mp,
u32  session_index 
)
static

Definition at line 1077 of file quic_echo.c.

+ Here is the call graph for this function:

static void echo_on_accept_error ( session_accepted_msg_t mp,
u32  session_index 
)
static

Definition at line 1090 of file quic_echo.c.

static void echo_on_accept_log_ip ( session_accepted_msg_t mp,
u32  session_index 
)
static

Definition at line 1097 of file quic_echo.c.

+ Here is the call graph for this function:

static void echo_on_accept_recv ( session_accepted_msg_t mp,
u32  session_index 
)
static

Definition at line 1064 of file quic_echo.c.

static void echo_on_connected_connect ( session_connected_msg_t mp,
u32  session_index 
)
static

Definition at line 1028 of file quic_echo.c.

+ Here is the call graph for this function:

static void echo_on_connected_error ( session_connected_msg_t mp,
u32  session_index 
)
static

Definition at line 1057 of file quic_echo.c.

static void echo_on_connected_send ( session_connected_msg_t mp,
u32  session_index 
)
static

Definition at line 1044 of file quic_echo.c.

static void echo_process_rpcs ( echo_main_t em)
static

Definition at line 1260 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_segment_handle_add_del ( echo_main_t em,
u64  segment_handle,
u8  add 
)
inlinestatic

Definition at line 183 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_send_connect ( u8 uri,
u32  opaque 
)
static

Definition at line 317 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int echo_send_rpc ( echo_main_t em,
void *  fp,
void *  arg,
u32  opaque 
)
static

Definition at line 151 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_session_dequeue_notify ( echo_session_t s)
inlinestatic

Definition at line 398 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_session_handle_add_del ( echo_main_t em,
u64  handle,
u32  sid 
)
inlinestatic

Definition at line 194 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static echo_session_t* echo_session_new ( echo_main_t em)
static

Definition at line 141 of file quic_echo.c.

+ Here is the caller graph for this function:

static void echo_session_prealloc ( echo_main_t em)
static

Definition at line 123 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword echo_unformat_quic_setup_vft ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 1131 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword echo_unformat_timing_event ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 72 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void echo_update_count_on_session_close ( echo_main_t em,
echo_session_t s 
)
static

Definition at line 710 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_quic_echo_state ( u8 s,
va_list *  args 
)

Definition at line 35 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void handle_mq_event ( session_event_t *  e)
static

Definition at line 1217 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 1784 of file quic_echo.c.

+ Here is the call graph for this function:

static int mirror_data_chunk ( echo_main_t em,
echo_session_t s,
u8 tx_buf,
u64  len 
)
static

Definition at line 701 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void print_global_json_stats ( echo_main_t em)
static

Definition at line 491 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void print_global_stats ( echo_main_t em)
static

Definition at line 522 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void print_usage_and_exit ( void  )
static

Definition at line 1619 of file quic_echo.c.

+ Here is the caller graph for this function:

void quic_echo_api_hookup ( echo_main_t em)

Definition at line 1599 of file quic_echo.c.

+ Here is the caller graph for this function:

static void quic_echo_notify_event ( echo_main_t em,
echo_test_evt_t  e 
)
static

Definition at line 373 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void quic_echo_process_opts ( int  argc,
char **  argv 
)

Definition at line 1669 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int recv_data_chunk ( echo_main_t em,
echo_session_t s,
u8 rx_buf 
)
static

Definition at line 667 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int send_data_chunk ( echo_session_t s,
u8 tx_buf,
int  offset,
int  len 
)
static

Definition at line 685 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void server_run ( echo_main_t em)
static

Definition at line 1324 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void server_send_listen ( echo_main_t em)
static

Definition at line 289 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void server_send_unbind ( echo_main_t em)
static

Definition at line 303 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void session_accepted_handler ( session_accepted_msg_t mp)
static

Definition at line 870 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void session_bound_handler ( session_bound_msg_t mp)
static

Definition at line 847 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void session_connected_handler ( session_connected_msg_t mp)
static

Definition at line 948 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void session_disconnected_handler ( session_disconnected_msg_t mp)
static

Definition at line 1150 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void session_print_stats ( echo_main_t em,
echo_session_t session 
)
static

Definition at line 472 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void session_reset_handler ( session_reset_msg_t mp)
static

Definition at line 1186 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int ssvm_segment_attach ( char *  name,
ssvm_segment_type_t  type,
int  fd 
)
static

Definition at line 411 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void stop_signal ( int  signum)
static

Definition at line 431 of file quic_echo.c.

+ Here is the caller graph for this function:

static void test_recv_bytes ( echo_main_t em,
echo_session_t s,
u8 rx_buf,
u32  n_read 
)
static

Definition at line 645 of file quic_echo.c.

+ Here is the caller graph for this function:

static uword unformat_close ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 57 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vl_api_application_attach_reply_t_handler ( vl_api_application_attach_reply_t mp)
static

Definition at line 1346 of file quic_echo.c.

+ Here is the call graph for this function:

static void vl_api_application_detach_reply_t_handler ( vl_api_application_detach_reply_t *  mp)
static

Definition at line 1424 of file quic_echo.c.

static void vl_api_application_tls_cert_add_reply_t_handler ( vl_api_application_tls_cert_add_reply_t *  mp)
static

Definition at line 1547 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void vl_api_application_tls_key_add_reply_t_handler ( vl_api_application_tls_key_add_reply_t *  mp)
static

Definition at line 1555 of file quic_echo.c.

+ Here is the caller graph for this function:

static void vl_api_bind_uri_reply_t_handler ( vl_api_bind_uri_reply_t *  mp)
static

Definition at line 1495 of file quic_echo.c.

+ Here is the call graph for this function:

static void vl_api_connect_uri_reply_t_handler ( vl_api_connect_uri_reply_t *  mp)
static

Definition at line 1562 of file quic_echo.c.

+ Here is the call graph for this function:

static void vl_api_disconnect_session_reply_t_handler ( vl_api_disconnect_session_reply_t mp)
static

Definition at line 1524 of file quic_echo.c.

+ Here is the call graph for this function:

static void vl_api_map_another_segment_t_handler ( vl_api_map_another_segment_t mp)
static

Definition at line 1446 of file quic_echo.c.

+ Here is the call graph for this function:

static void vl_api_unbind_uri_reply_t_handler ( vl_api_unbind_uri_reply_t *  mp)
static

Definition at line 1509 of file quic_echo.c.

+ Here is the call graph for this function:

static void vl_api_unmap_segment_t_handler ( vl_api_unmap_segment_t mp)
static

Definition at line 1437 of file quic_echo.c.

+ Here is the call graph for this function:

static int wait_for_segment_allocation ( u64  segment_handle)
static

Definition at line 351 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int wait_for_state_change ( echo_main_t em,
connection_state_t  state,
f64  timeout 
)
static

Definition at line 1244 of file quic_echo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const quic_echo_cb_vft_t default_cb_vft
static
Initial value:
= {
.quic_accepted_cb = echo_on_accept_log_ip,
.quic_connected_cb = echo_on_connected_connect,
.server_stream_accepted_cb = echo_on_accept_recv,
.client_stream_connected_cb = echo_on_connected_send,
.client_stream_accepted_cb = echo_on_accept_error,
.server_stream_connected_cb = echo_on_connected_error,
}
static void echo_on_accept_error(session_accepted_msg_t *mp, u32 session_index)
Definition: quic_echo.c:1090
static void echo_on_connected_connect(session_connected_msg_t *mp, u32 session_index)
Definition: quic_echo.c:1028
static void echo_on_connected_error(session_connected_msg_t *mp, u32 session_index)
Definition: quic_echo.c:1057
static void echo_on_accept_recv(session_accepted_msg_t *mp, u32 session_index)
Definition: quic_echo.c:1064
static void echo_on_accept_log_ip(session_accepted_msg_t *mp, u32 session_index)
Definition: quic_echo.c:1097
static void echo_on_connected_send(session_connected_msg_t *mp, u32 session_index)
Definition: quic_echo.c:1044

Definition at line 1106 of file quic_echo.c.

echo_main_t echo_main

Definition at line 26 of file quic_echo.c.

const quic_echo_cb_vft_t server_stream_cb_vft
static
Initial value:
= {
.quic_accepted_cb = echo_on_accept_connect,
.quic_connected_cb = NULL,
.server_stream_accepted_cb = echo_on_accept_error,
.client_stream_connected_cb = echo_on_connected_error,
.client_stream_accepted_cb = echo_on_accept_recv,
.server_stream_connected_cb = echo_on_connected_send,
}
#define NULL
Definition: clib.h:58
static void echo_on_accept_connect(session_accepted_msg_t *mp, u32 session_index)
Definition: quic_echo.c:1077
static void echo_on_accept_error(session_accepted_msg_t *mp, u32 session_index)
Definition: quic_echo.c:1090
static void echo_on_connected_error(session_connected_msg_t *mp, u32 session_index)
Definition: quic_echo.c:1057
static void echo_on_accept_recv(session_accepted_msg_t *mp, u32 session_index)
Definition: quic_echo.c:1064
static void echo_on_connected_send(session_connected_msg_t *mp, u32 session_index)
Definition: quic_echo.c:1044

Definition at line 1118 of file quic_echo.c.