|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
21 typedef struct _quic_echo_cb_vft
60 a->parent_session_handle = mp->
handle;
61 a->context = session_index;
69 ECHO_LOG (1,
"Qsession 0x%llx S[%d] connected to %U:%d",
71 mp->
lcl.is_ip4, clib_net_to_host_u16 (mp->
lcl.port));
77 static u32 client_index = 0;
92 "Got a wrong connected on session %u [%lx]", session_index,
99 static u32 client_index = 0;
115 ECHO_LOG (2,
"Accept on QSession 0x%lx S[%u]", mp->
handle, session_index);
119 a->parent_session_handle = mp->
handle;
120 a->context = session_index;
133 "Got a wrong accept on session 0x%lx S[%u]", mp->
handle,
142 ECHO_LOG (1,
"Accepted session from: %s:%d", ip_str,
143 clib_net_to_host_u16 (mp->
rmt.port));
162 .quic_connected_cb = NULL,
181 ECHO_LOG (2,
"%U: Invalid listener session type",
229 ECHO_LOG (2,
"Cleanup sessions (still %uQ %uS): app %U",
281 if (eqm->
cb_vft.quic_connected_cb)
282 eqm->
cb_vft.quic_connected_cb (mp, session->session_index);
299 eqm->
cb_vft.server_stream_connected_cb (mp, session->session_index);
301 eqm->
cb_vft.client_stream_connected_cb (mp, session->session_index);
326 u32 session_index,
u8 is_failed)
330 ECHO_FAIL (ECHO_FAIL_QUIC_WRONG_CONNECT,
"Echo connect failed");
350 if (eqm->
cb_vft.quic_accepted_cb)
351 eqm->
cb_vft.quic_accepted_cb (mp, session->session_index);
365 eqm->
cb_vft.server_stream_accepted_cb (mp, session->session_index);
367 eqm->
cb_vft.client_stream_accepted_cb (mp, session->session_index);
377 "expected unidirectional streams");
445 if (
unformat (input,
"serverstream"))
447 else if (
unformat (input,
"default"))
509 "-- QUIC specific options -- \n"
510 " quic-setup OPT OPT=serverstream : Client open N connections. \n"
511 " On each one server opens M streams\n"
512 " OPT=default : Client open N connections.\n"
513 " On each one client opens M streams\n"
514 " qclose=[Y|N|W] When connection is done send[Y]|nop[N]|wait[W] for close\n"
515 " uni Use unidirectional streams\n"
517 " quic-streams N Open N QUIC streams (defaults to 1)\n");
static void quic_echo_on_accept_log_ip(session_accepted_msg_t *mp, u32 session_index)
static void quic_echo_on_connected_connect(session_connected_msg_t *mp, u32 session_index)
ECHO_REGISTER_PROTO(TRANSPORT_PROTO_QUIC, quic_echo_proto_cb_vft)
u32 *volatile data_thread_args
#define ECHO_FAIL(fail, _fmt, _args...)
echo_session_t * sessions
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
volatile u32 n_clients_connected
volatile u64 accepted_session_count
static int quic_echo_process_opts_cb(unformat_input_t *a)
static void quic_echo_set_defaults_before_opts_cb()
@ ECHO_EVT_FIRST_QCONNECT
volatile connection_state_t state
#define SESSION_INVALID_INDEX
@ ECHO_SESSION_TYPE_STREAM
static void quic_echo_accepted_cb(session_accepted_msg_t *mp, echo_session_t *session)
@ ECHO_SESSION_STATE_READY
static void quic_echo_on_connected_error(session_connected_msg_t *mp, u32 session_index)
volatile u32 n_quic_clients_connected
static void quic_echo_on_accept_recv(session_accepted_msg_t *mp, u32 session_index)
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
quic_echo_proto_main_t quic_echo_proto_main
static void quic_echo_connected_cb(session_connected_bundled_msg_t *mp, u32 session_index, u8 is_failed)
@ ECHO_SESSION_TYPE_LISTEN
static void quic_echo_print_usage_cb()
static void quic_echo_on_connected(session_connected_msg_t *mp, u32 session_index)
static void quic_echo_reset_cb(session_reset_msg_t *mp, echo_session_t *s)
foreach_app_session_field u64 vpp_session_handle
static void quic_echo_disconnected_cb(session_disconnected_msg_t *mp, echo_session_t *s)
int echo_send_rpc(echo_main_t *em, void *fp, echo_rpc_args_t *args)
#define pool_foreach(VAR, POOL)
Iterate through pool.
void echo_send_disconnect_session(echo_main_t *em, void *args)
static void quic_echo_on_accept_connect(session_accepted_msg_t *mp, u32 session_index)
void echo_session_print_stats(echo_main_t *em, echo_session_t *session)
static const quic_echo_cb_vft_t default_cb_vft
static void quic_echo_cleanup_cb(echo_session_t *s, u8 parent_died)
sll srl srl sll sra u16x4 i
static void quic_echo_on_connected_send(session_connected_msg_t *mp, u32 session_index)
@ ECHO_SESSION_STATE_AWAIT_DATA
@ ECHO_SESSION_STATE_CLOSING
uword echo_unformat_close(unformat_input_t *input, va_list *args)
void echo_send_connect(echo_main_t *em, void *args)
static void quic_echo_cleanup_listener(u32 listener_index, echo_main_t *em, quic_echo_proto_main_t *eqm)
@ ECHO_EVT_LAST_QCONNECTED
@ ECHO_EVT_FIRST_SCONNECT
#define clib_atomic_sub_fetch(a, b)
teardown_stat_t active_count
static const quic_echo_cb_vft_t server_stream_cb_vft
#define clib_atomic_fetch_add(a, b)
u8 * echo_format_app_state(u8 *s, va_list *args)
u8 * echo_format_session(u8 *s, va_list *args)
static void quic_echo_set_defaults_after_opts_cb()
teardown_stat_t accepted_count
volatile u64 bytes_to_receive
echo_proto_cb_vft_t quic_echo_proto_cb_vft
teardown_stat_t connected_count
description fragment has unexpected format
format_function_t format_ip46_address
@ ECHO_EVT_LAST_SCONNECTED
teardown_stat_t reset_count
@ TRANSPORT_CFG_F_UNIDIRECTIONAL
struct echo_main_t::@681 uri_elts
teardown_stat_t clean_count
static void quic_echo_sent_disconnect_cb(echo_session_t *s)
#define ECHO_LOG(lvl, _fmt, _args...)
static void quic_echo_on_accept_error(session_accepted_msg_t *mp, u32 session_index)
quic_echo_cb_vft_t cb_vft
teardown_stat_t close_count
static void quic_echo_initiate_qsession_close_no_stream(echo_main_t *em)
void(* disconnected_cb)(session_disconnected_msg_t *mp, echo_session_t *s)
@ ECHO_SESSION_STATE_CLOSED
void echo_notify_event(echo_main_t *em, echo_test_evt_t e)
static uword quic_echo_unformat_setup_vft(unformat_input_t *input, va_list *args)
struct _quic_echo_cb_vft quic_echo_cb_vft_t