FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
quic.c File Reference
+ Include dependency graph for quic.c:

Go to the source code of this file.

Macros

#define quic_error(n, s)   s,
 
#define DEFAULT_MAX_PACKETS_PER_KEY   16777216
 

Functions

static void quic_update_timer (quic_ctx_t *ctx)
 
static void quic_check_quic_session_connected (quic_ctx_t *ctx)
 
static int quic_reset_connection (u64 udp_session_handle, quic_rx_packet_ctx_t *pctx)
 
static void quic_proto_on_close (u32 ctx_index, u32 thread_index)
 
static void quic_crypto_context_make_key_from_ctx (clib_bihash_kv_24_8_t *kv, quic_ctx_t *ctx)
 
static void quic_crypto_context_make_key_from_crctx (clib_bihash_kv_24_8_t *kv, crypto_context_t *crctx)
 
static void quic_crypto_context_free_if_needed (crypto_context_t *crctx, u8 thread_index)
 
static quicly_datagram_t * quic_alloc_packet (quicly_packet_allocator_t *self, size_t payloadsize)
 
static void quic_free_packet (quicly_packet_allocator_t *self, quicly_datagram_t *packet)
 
static int quic_app_cert_key_pair_delete_callback (app_cert_key_pair_t *ckpair)
 
static crypto_context_tquic_crypto_context_alloc (u8 thread_index)
 
static crypto_context_tquic_crypto_context_get (u32 cr_index, u32 thread_index)
 
static clib_error_tquic_list_crypto_context_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tquic_set_max_packets_per_key_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static void quic_release_crypto_context (u32 crypto_context_index, u8 thread_index)
 
static int quic_init_crypto_context (crypto_context_t *crctx, quic_ctx_t *ctx)
 
static int quic_acquire_crypto_context (quic_ctx_t *ctx)
 
static u32 quic_ctx_alloc (u32 thread_index)
 
static void quic_ctx_free (quic_ctx_t *ctx)
 
static quic_ctx_tquic_ctx_get (u32 ctx_index, u32 thread_index)
 
static quic_ctx_tquic_ctx_get_if_valid (u32 ctx_index, u32 thread_index)
 
quic_ctx_tquic_get_conn_ctx (quicly_conn_t *conn)
 
static void quic_store_conn_ctx (quicly_conn_t *conn, quic_ctx_t *ctx)
 
static int quic_ctx_is_stream (quic_ctx_t *ctx)
 
static int quic_ctx_is_listener (quic_ctx_t *ctx)
 
static int quic_ctx_is_conn (quic_ctx_t *ctx)
 
static session_tget_stream_session_and_ctx_from_stream (quicly_stream_t *stream, quic_ctx_t **ctx)
 
static void quic_make_connection_key (clib_bihash_kv_16_8_t *kv, const quicly_cid_plaintext_t *id)
 
static int quic_sendable_packet_count (session_t *udp_session)
 
static quicly_context_t * quic_get_quicly_ctx_from_ctx (quic_ctx_t *ctx)
 
static quicly_context_t * quic_get_quicly_ctx_from_udp (u64 udp_session_handle)
 
static void quic_set_udp_tx_evt (session_t *udp_session)
 
static void quic_stop_ctx_timer (quic_ctx_t *ctx)
 
static void quic_ack_rx_data (session_t *stream_session)
 
static void quic_disconnect_transport (quic_ctx_t *ctx)
 
static void quic_connection_delete (quic_ctx_t *ctx)
 
void quic_increment_counter (u8 evt, u8 val)
 
static void quic_connection_closed (quic_ctx_t *ctx)
 Called when quicly return an error This function interacts tightly with quic_proto_on_close. More...
 
static int quic_send_datagram (session_t *udp_session, quicly_datagram_t *packet)
 
static int quic_send_packets (quic_ctx_t *ctx)
 
static void quic_on_stream_destroy (quicly_stream_t *stream, int err)
 
static void quic_on_stop_sending (quicly_stream_t *stream, int err)
 
static void quic_on_receive_reset (quicly_stream_t *stream, int err)
 
static void quic_on_receive (quicly_stream_t *stream, size_t off, const void *src, size_t len)
 
void quic_fifo_egress_shift (quicly_stream_t *stream, size_t delta)
 
void quic_fifo_egress_emit (quicly_stream_t *stream, size_t off, void *dst, size_t *len, int *wrote_all)
 
static int quic_on_stream_open (quicly_stream_open_t *self, quicly_stream_t *stream)
 
static void quic_on_closed_by_peer (quicly_closed_by_peer_t *self, quicly_conn_t *conn, int code, uint64_t frame_type, const char *reason, size_t reason_len)
 
static int64_t quic_get_thread_time (u8 thread_index)
 
static int64_t quic_get_time (quicly_now_t *self)
 
static u32 quic_set_time_now (u32 thread_index)
 
static void quic_update_time (f64 now, u8 thread_index)
 
static void quic_timer_expired (u32 conn_index)
 
static void quic_expired_timers_dispatch (u32 *expired_timers)
 
static int quic_connect_stream (session_t *quic_session, session_endpoint_cfg_t *sep)
 
static int quic_connect_connection (session_endpoint_cfg_t *sep)
 
static int quic_connect (transport_endpoint_cfg_t *tep)
 
static u32 quic_start_listen (u32 quic_listen_session_index, transport_endpoint_t *tep)
 
static u32 quic_stop_listen (u32 lctx_index)
 
static transport_connection_tquic_connection_get (u32 ctx_index, u32 thread_index)
 
static transport_connection_tquic_listener_get (u32 listener_index)
 
static u8format_quic_ctx (u8 *s, va_list *args)
 
static u8format_quic_connection (u8 *s, va_list *args)
 
static u8format_quic_half_open (u8 *s, va_list *args)
 
static u8format_quic_listener (u8 *s, va_list *args)
 
static void quic_build_sockaddr (struct sockaddr *sa, socklen_t *salen, ip46_address_t *addr, u16 port, u8 is_ip4)
 
static void quic_on_quic_session_connected (quic_ctx_t *ctx)
 
static void quic_update_conn_ctx (quicly_conn_t *conn, quicly_context_t *quicly_context)
 
static void quic_receive_connection (void *arg)
 
static void quic_transfer_connection (u32 ctx_index, u32 dest_thread)
 
static int quic_udp_session_connected_callback (u32 quic_app_index, u32 ctx_index, session_t *udp_session, session_error_t err)
 
static void quic_udp_session_disconnect_callback (session_t *s)
 
static void quic_udp_session_cleanup_callback (session_t *udp_session, session_cleanup_ntf_t ntf)
 
static void quic_udp_session_reset_callback (session_t *s)
 
static void quic_udp_session_migrate_callback (session_t *s, session_handle_t new_sh)
 
int quic_udp_session_accepted_callback (session_t *udp_session)
 
static int quic_add_segment_callback (u32 client_index, u64 seg_handle)
 
static int quic_del_segment_callback (u32 client_index, u64 seg_handle)
 
static int quic_custom_app_rx_callback (transport_connection_t *tc)
 
static int quic_custom_tx_callback (void *s, transport_send_params_t *sp)
 
static int quic_find_packet_ctx (quic_rx_packet_ctx_t *pctx, u32 caller_thread_index)
 
static void quic_accept_connection (quic_rx_packet_ctx_t *pctx)
 
static int quic_process_one_rx_packet (u64 udp_session_handle, svm_fifo_t *f, u32 fifo_offset, quic_rx_packet_ctx_t *pctx)
 
static int quic_udp_session_rx_callback (session_t *udp_session)
 
static void quic_common_get_transport_endpoint (quic_ctx_t *ctx, transport_endpoint_t *tep, u8 is_lcl)
 
static void quic_get_transport_listener_endpoint (u32 listener_index, transport_endpoint_t *tep, u8 is_lcl)
 
static void quic_get_transport_endpoint (u32 ctx_index, u32 thread_index, transport_endpoint_t *tep, u8 is_lcl)
 
static void quic_register_cipher_suite (crypto_engine_type_t type, ptls_cipher_suite_t **ciphers)
 
static void quic_update_fifo_size ()
 
static clib_error_tquic_init (vlib_main_t *vm)
 
static clib_error_tquic_plugin_crypto_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tquic_plugin_set_fifo_size_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static u64 quic_get_counter_value (u32 event_code)
 
static void quic_show_aggregated_stats (vlib_main_t *vm)
 
static u8quic_format_quicly_conn_id (u8 *s, va_list *args)
 
static u8quic_format_quicly_stream_id (u8 *s, va_list *args)
 
static u8quic_format_listener_ctx (u8 *s, va_list *args)
 
static u8quic_format_connection_ctx (u8 *s, va_list *args)
 
static u8quic_format_stream_ctx (u8 *s, va_list *args)
 
static clib_error_tquic_show_connections_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
 VLIB_PLUGIN_REGISTER ()
 
static clib_error_tquic_config_fn (vlib_main_t *vm, unformat_input_t *input)
 
static uword quic_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

quicly_crypto_engine_t quic_crypto_engine
 
static char * quic_error_strings []
 
quic_main_t quic_main
 
static quicly_stream_open_t on_stream_open = { quic_on_stream_open }
 
static quicly_closed_by_peer_t on_closed_by_peer = { quic_on_closed_by_peer }
 
static quicly_now_t quicly_vpp_now_cb = { quic_get_time }
 
quicly_packet_allocator_t quic_packet_allocator
 
static const quicly_stream_callbacks_t quic_stream_callbacks
 
static session_cb_vft_t quic_app_cb_vft
 
static const transport_proto_vft_t quic_proto
 
u64 quic_fifosize = 0
 
static vlib_cli_command_t quic_plugin_crypto_command
 (constructor) VLIB_CLI_COMMAND (quic_plugin_crypto_command) More...
 
static vlib_cli_command_t quic_plugin_set_fifo_size_command
 (constructor) VLIB_CLI_COMMAND (quic_plugin_set_fifo_size_command) More...
 
static vlib_cli_command_t quic_show_ctx_command
 (constructor) VLIB_CLI_COMMAND (quic_show_ctx_command) More...
 
static vlib_cli_command_t quic_list_crypto_context_command
 (constructor) VLIB_CLI_COMMAND (quic_list_crypto_context_command) More...
 
static vlib_cli_command_t quic_set_max_packets_per_key
 (constructor) VLIB_CLI_COMMAND (quic_set_max_packets_per_key) More...
 
vlib_node_registration_t quic_input_node
 (constructor) VLIB_REGISTER_NODE (quic_input_node) More...
 

Macro Definition Documentation

◆ DEFAULT_MAX_PACKETS_PER_KEY

#define DEFAULT_MAX_PACKETS_PER_KEY   16777216

Definition at line 44 of file quic.c.

◆ quic_error

#define quic_error (   n,
 
)    s,

Function Documentation

◆ format_quic_connection()

static u8* format_quic_connection ( u8 s,
va_list *  args 
)
static

Definition at line 1554 of file quic.c.

+ Here is the call graph for this function:

◆ format_quic_ctx()

static u8* format_quic_ctx ( u8 s,
va_list *  args 
)
static

Definition at line 1523 of file quic.c.

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

◆ format_quic_half_open()

static u8* format_quic_half_open ( u8 s,
va_list *  args 
)
static

Definition at line 1565 of file quic.c.

+ Here is the call graph for this function:

◆ format_quic_listener()

static u8* format_quic_listener ( u8 s,
va_list *  args 
)
static

Definition at line 1577 of file quic.c.

+ Here is the call graph for this function:

◆ get_stream_session_and_ctx_from_stream()

static session_t* get_stream_session_and_ctx_from_stream ( quicly_stream_t *  stream,
quic_ctx_t **  ctx 
)
inlinestatic

Definition at line 449 of file quic.c.

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

◆ quic_accept_connection()

static void quic_accept_connection ( quic_rx_packet_ctx_t pctx)
static

Definition at line 2045 of file quic.c.

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

◆ quic_ack_rx_data()

static void quic_ack_rx_data ( session_t stream_session)
static

Definition at line 521 of file quic.c.

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

◆ quic_acquire_crypto_context()

static int quic_acquire_crypto_context ( quic_ctx_t ctx)
static

Definition at line 321 of file quic.c.

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

◆ quic_add_segment_callback()

static int quic_add_segment_callback ( u32  client_index,
u64  seg_handle 
)
static

Definition at line 1917 of file quic.c.

◆ quic_alloc_packet()

static quicly_datagram_t* quic_alloc_packet ( quicly_packet_allocator_t *  self,
size_t  payloadsize 
)
static

Definition at line 95 of file quic.c.

+ Here is the call graph for this function:

◆ quic_app_cert_key_pair_delete_callback()

static int quic_app_cert_key_pair_delete_callback ( app_cert_key_pair_t ckpair)
static

Definition at line 122 of file quic.c.

+ Here is the call graph for this function:

◆ quic_build_sockaddr()

static void quic_build_sockaddr ( struct sockaddr *  sa,
socklen_t *  salen,
ip46_address_t *  addr,
u16  port,
u8  is_ip4 
)
inlinestatic

Definition at line 1590 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_check_quic_session_connected()

static void quic_check_quic_session_connected ( quic_ctx_t ctx)
static

Definition at line 1660 of file quic.c.

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

◆ quic_common_get_transport_endpoint()

static void quic_common_get_transport_endpoint ( quic_ctx_t ctx,
transport_endpoint_t tep,
u8  is_lcl 
)
inlinestatic

Definition at line 2350 of file quic.c.

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

◆ quic_config_fn()

static clib_error_t* quic_config_fn ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 2870 of file quic.c.

+ Here is the call graph for this function:

◆ quic_connect()

static int quic_connect ( transport_endpoint_cfg_t tep)
static

Definition at line 1344 of file quic.c.

+ Here is the call graph for this function:

◆ quic_connect_connection()

static int quic_connect_connection ( session_endpoint_cfg_t sep)
static

Definition at line 1291 of file quic.c.

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

◆ quic_connect_stream()

static int quic_connect_stream ( session_t quic_session,
session_endpoint_cfg_t sep 
)
static

Definition at line 1181 of file quic.c.

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

◆ quic_connection_closed()

static void quic_connection_closed ( quic_ctx_t ctx)
static

Called when quicly return an error This function interacts tightly with quic_proto_on_close.

Definition at line 596 of file quic.c.

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

◆ quic_connection_delete()

static void quic_connection_delete ( quic_ctx_t ctx)
static

Definition at line 559 of file quic.c.

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

◆ quic_connection_get()

static transport_connection_t* quic_connection_get ( u32  ctx_index,
u32  thread_index 
)
static

Definition at line 1506 of file quic.c.

+ Here is the call graph for this function:

◆ quic_crypto_context_alloc()

static crypto_context_t* quic_crypto_context_alloc ( u8  thread_index)
static

Definition at line 147 of file quic.c.

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

◆ quic_crypto_context_free_if_needed()

static void quic_crypto_context_free_if_needed ( crypto_context_t crctx,
u8  thread_index 
)
static

Definition at line 81 of file quic.c.

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

◆ quic_crypto_context_get()

static crypto_context_t* quic_crypto_context_get ( u32  cr_index,
u32  thread_index 
)
static

Definition at line 162 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_crypto_context_make_key_from_crctx()

static void quic_crypto_context_make_key_from_crctx ( clib_bihash_kv_24_8_t kv,
crypto_context_t crctx 
)
inlinestatic

Definition at line 70 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_crypto_context_make_key_from_ctx()

static void quic_crypto_context_make_key_from_ctx ( clib_bihash_kv_24_8_t kv,
quic_ctx_t ctx 
)
inlinestatic

Definition at line 60 of file quic.c.

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

◆ quic_ctx_alloc()

static u32 quic_ctx_alloc ( u32  thread_index)
static

Definition at line 375 of file quic.c.

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

◆ quic_ctx_free()

static void quic_ctx_free ( quic_ctx_t ctx)
static

Definition at line 391 of file quic.c.

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

◆ quic_ctx_get()

static quic_ctx_t* quic_ctx_get ( u32  ctx_index,
u32  thread_index 
)
static

Definition at line 402 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_ctx_get_if_valid()

static quic_ctx_t* quic_ctx_get_if_valid ( u32  ctx_index,
u32  thread_index 
)
static

Definition at line 408 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_ctx_is_conn()

static int quic_ctx_is_conn ( quic_ctx_t ctx)
inlinestatic

Definition at line 443 of file quic.c.

+ Here is the call graph for this function:

◆ quic_ctx_is_listener()

static int quic_ctx_is_listener ( quic_ctx_t ctx)
inlinestatic

Definition at line 437 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_ctx_is_stream()

static int quic_ctx_is_stream ( quic_ctx_t ctx)
inlinestatic

Definition at line 431 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_custom_app_rx_callback()

static int quic_custom_app_rx_callback ( transport_connection_t tc)
static

Definition at line 1931 of file quic.c.

+ Here is the call graph for this function:

◆ quic_custom_tx_callback()

static int quic_custom_tx_callback ( void *  s,
transport_send_params_t sp 
)
static

Definition at line 1947 of file quic.c.

+ Here is the call graph for this function:

◆ quic_del_segment_callback()

static int quic_del_segment_callback ( u32  client_index,
u64  seg_handle 
)
static

Definition at line 1924 of file quic.c.

◆ quic_disconnect_transport()

static void quic_disconnect_transport ( quic_ctx_t ctx)
static

Definition at line 545 of file quic.c.

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

◆ quic_expired_timers_dispatch()

static void quic_expired_timers_dispatch ( u32 expired_timers)
static

Definition at line 1169 of file quic.c.

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

◆ quic_fifo_egress_emit()

void quic_fifo_egress_emit ( quicly_stream_t *  stream,
size_t  off,
void *  dst,
size_t *  len,
int *  wrote_all 
)

Definition at line 919 of file quic.c.

+ Here is the call graph for this function:

◆ quic_fifo_egress_shift()

void quic_fifo_egress_shift ( quicly_stream_t *  stream,
size_t  delta 
)

Definition at line 896 of file quic.c.

+ Here is the call graph for this function:

◆ quic_find_packet_ctx()

static int quic_find_packet_ctx ( quic_rx_packet_ctx_t pctx,
u32  caller_thread_index 
)
inlinestatic

Definition at line 2000 of file quic.c.

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

◆ quic_format_connection_ctx()

static u8* quic_format_connection_ctx ( u8 s,
va_list *  args 
)
static

Definition at line 2724 of file quic.c.

+ Here is the call graph for this function:

◆ quic_format_listener_ctx()

static u8* quic_format_listener_ctx ( u8 s,
va_list *  args 
)
static

Definition at line 2716 of file quic.c.

+ Here is the call graph for this function:

◆ quic_format_quicly_conn_id()

static u8* quic_format_quicly_conn_id ( u8 s,
va_list *  args 
)
static

Definition at line 2698 of file quic.c.

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

◆ quic_format_quicly_stream_id()

static u8* quic_format_quicly_stream_id ( u8 s,
va_list *  args 
)
static

Definition at line 2706 of file quic.c.

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

◆ quic_format_stream_ctx()

static u8* quic_format_stream_ctx ( u8 s,
va_list *  args 
)
static

Definition at line 2752 of file quic.c.

+ Here is the call graph for this function:

◆ quic_free_packet()

static void quic_free_packet ( quicly_packet_allocator_t *  self,
quicly_datagram_t *  packet 
)
static

Definition at line 112 of file quic.c.

+ Here is the call graph for this function:

◆ quic_get_conn_ctx()

quic_ctx_t* quic_get_conn_ctx ( quicly_conn_t *  conn)

Definition at line 416 of file quic.c.

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

◆ quic_get_counter_value()

static u64 quic_get_counter_value ( u32  event_code)
inlinestatic

Definition at line 2596 of file quic.c.

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

◆ quic_get_quicly_ctx_from_ctx()

static quicly_context_t* quic_get_quicly_ctx_from_ctx ( quic_ctx_t ctx)
static

Definition at line 477 of file quic.c.

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

◆ quic_get_quicly_ctx_from_udp()

static quicly_context_t* quic_get_quicly_ctx_from_udp ( u64  udp_session_handle)
static

Definition at line 487 of file quic.c.

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

◆ quic_get_thread_time()

static int64_t quic_get_thread_time ( u8  thread_index)
static

Definition at line 1064 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_get_time()

static int64_t quic_get_time ( quicly_now_t *  self)
static

Definition at line 1070 of file quic.c.

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

◆ quic_get_transport_endpoint()

static void quic_get_transport_endpoint ( u32  ctx_index,
u32  thread_index,
transport_endpoint_t tep,
u8  is_lcl 
)
static

Definition at line 2379 of file quic.c.

+ Here is the call graph for this function:

◆ quic_get_transport_listener_endpoint()

static void quic_get_transport_listener_endpoint ( u32  listener_index,
transport_endpoint_t tep,
u8  is_lcl 
)
static

Definition at line 2362 of file quic.c.

+ Here is the call graph for this function:

◆ quic_increment_counter()

void quic_increment_counter ( u8  evt,
u8  val 
)

Definition at line 585 of file quic.c.

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

◆ quic_init()

static clib_error_t* quic_init ( vlib_main_t vm)
static

Definition at line 2458 of file quic.c.

+ Here is the call graph for this function:

◆ quic_init_crypto_context()

static int quic_init_crypto_context ( crypto_context_t crctx,
quic_ctx_t ctx 
)
static

Definition at line 226 of file quic.c.

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

◆ quic_list_crypto_context_command_fn()

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

Definition at line 171 of file quic.c.

+ Here is the call graph for this function:

◆ quic_listener_get()

static transport_connection_t* quic_listener_get ( u32  listener_index)
static

Definition at line 1514 of file quic.c.

+ Here is the call graph for this function:

◆ quic_make_connection_key()

static void quic_make_connection_key ( clib_bihash_kv_16_8_t kv,
const quicly_cid_plaintext_t *  id 
)
inlinestatic

Definition at line 460 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_node_fn()

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

Definition at line 2906 of file quic.c.

◆ quic_on_closed_by_peer()

static void quic_on_closed_by_peer ( quicly_closed_by_peer_t *  self,
quicly_conn_t *  conn,
int  code,
uint64_t  frame_type,
const char *  reason,
size_t  reason_len 
)
static

Definition at line 1046 of file quic.c.

+ Here is the call graph for this function:

◆ quic_on_quic_session_connected()

static void quic_on_quic_session_connected ( quic_ctx_t ctx)
static

Definition at line 1612 of file quic.c.

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

◆ quic_on_receive()

static void quic_on_receive ( quicly_stream_t *  stream,
size_t  off,
const void *  src,
size_t  len 
)
static

Definition at line 818 of file quic.c.

+ Here is the call graph for this function:

◆ quic_on_receive_reset()

static void quic_on_receive_reset ( quicly_stream_t *  stream,
int  err 
)
static

Definition at line 803 of file quic.c.

+ Here is the call graph for this function:

◆ quic_on_stop_sending()

static void quic_on_stop_sending ( quicly_stream_t *  stream,
int  err 
)
static

Definition at line 788 of file quic.c.

+ Here is the call graph for this function:

◆ quic_on_stream_destroy()

static void quic_on_stream_destroy ( quicly_stream_t *  stream,
int  err 
)
static

Definition at line 769 of file quic.c.

+ Here is the call graph for this function:

◆ quic_on_stream_open()

static int quic_on_stream_open ( quicly_stream_open_t *  self,
quicly_stream_t *  stream 
)
static

Definition at line 963 of file quic.c.

+ Here is the call graph for this function:

◆ quic_plugin_crypto_command_fn()

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

Definition at line 2544 of file quic.c.

+ Here is the call graph for this function:

◆ quic_plugin_set_fifo_size_command_fn()

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

Definition at line 2564 of file quic.c.

+ Here is the call graph for this function:

◆ quic_process_one_rx_packet()

static int quic_process_one_rx_packet ( u64  udp_session_handle,
svm_fifo_t f,
u32  fifo_offset,
quic_rx_packet_ctx_t pctx 
)
static

Definition at line 2151 of file quic.c.

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

◆ quic_proto_on_close()

static void quic_proto_on_close ( u32  ctx_index,
u32  thread_index 
)
static

Definition at line 1359 of file quic.c.

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

◆ quic_receive_connection()

static void quic_receive_connection ( void *  arg)
static

Definition at line 1691 of file quic.c.

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

◆ quic_register_cipher_suite()

static void quic_register_cipher_suite ( crypto_engine_type_t  type,
ptls_cipher_suite_t **  ciphers 
)
static

Definition at line 2430 of file quic.c.

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

◆ quic_release_crypto_context()

static void quic_release_crypto_context ( u32  crypto_context_index,
u8  thread_index 
)
static

Definition at line 217 of file quic.c.

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

◆ quic_reset_connection()

static int quic_reset_connection ( u64  udp_session_handle,
quic_rx_packet_ctx_t pctx 
)
static

Definition at line 2124 of file quic.c.

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

◆ quic_send_datagram()

static int quic_send_datagram ( session_t udp_session,
quicly_datagram_t *  packet 
)
static

Definition at line 635 of file quic.c.

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

◆ quic_send_packets()

static int quic_send_packets ( quic_ctx_t ctx)
static

Definition at line 696 of file quic.c.

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

◆ quic_sendable_packet_count()

static int quic_sendable_packet_count ( session_t udp_session)
static

Definition at line 468 of file quic.c.

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

◆ quic_set_max_packets_per_key_fn()

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

Definition at line 191 of file quic.c.

+ Here is the call graph for this function:

◆ quic_set_time_now()

static u32 quic_set_time_now ( u32  thread_index)
static

Definition at line 1077 of file quic.c.

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

◆ quic_set_udp_tx_evt()

static void quic_set_udp_tx_evt ( session_t udp_session)
inlinestatic

Definition at line 496 of file quic.c.

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

◆ quic_show_aggregated_stats()

static void quic_show_aggregated_stats ( vlib_main_t vm)
static

Definition at line 2626 of file quic.c.

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

◆ quic_show_connections_command_fn()

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

Definition at line 2775 of file quic.c.

+ Here is the call graph for this function:

◆ quic_start_listen()

static u32 quic_start_listen ( u32  quic_listen_session_index,
transport_endpoint_t tep 
)
static

Definition at line 1422 of file quic.c.

+ Here is the call graph for this function:

◆ quic_stop_ctx_timer()

static void quic_stop_ctx_timer ( quic_ctx_t ctx)
inlinestatic

Definition at line 507 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_stop_listen()

static u32 quic_stop_listen ( u32  lctx_index)
static

Definition at line 1485 of file quic.c.

+ Here is the call graph for this function:

◆ quic_store_conn_ctx()

static void quic_store_conn_ctx ( quicly_conn_t *  conn,
quic_ctx_t ctx 
)
static

Definition at line 424 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_timer_expired()

static void quic_timer_expired ( u32  conn_index)
static

Definition at line 1097 of file quic.c.

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

◆ quic_transfer_connection()

static void quic_transfer_connection ( u32  ctx_index,
u32  dest_thread 
)
static

Definition at line 1735 of file quic.c.

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

◆ quic_udp_session_accepted_callback()

int quic_udp_session_accepted_callback ( session_t udp_session)

Definition at line 1879 of file quic.c.

+ Here is the call graph for this function:

◆ quic_udp_session_cleanup_callback()

static void quic_udp_session_cleanup_callback ( session_t udp_session,
session_cleanup_ntf_t  ntf 
)
static

Definition at line 1839 of file quic.c.

+ Here is the call graph for this function:

◆ quic_udp_session_connected_callback()

static int quic_udp_session_connected_callback ( u32  quic_app_index,
u32  ctx_index,
session_t udp_session,
session_error_t  err 
)
static

Definition at line 1758 of file quic.c.

+ Here is the call graph for this function:

◆ quic_udp_session_disconnect_callback()

static void quic_udp_session_disconnect_callback ( session_t s)
static

Definition at line 1833 of file quic.c.

◆ quic_udp_session_migrate_callback()

static void quic_udp_session_migrate_callback ( session_t s,
session_handle_t  new_sh 
)
static

Definition at line 1861 of file quic.c.

+ Here is the call graph for this function:

◆ quic_udp_session_reset_callback()

static void quic_udp_session_reset_callback ( session_t s)
static

Definition at line 1855 of file quic.c.

◆ quic_udp_session_rx_callback()

static int quic_udp_session_rx_callback ( session_t udp_session)
static

Definition at line 2226 of file quic.c.

+ Here is the call graph for this function:

◆ quic_update_conn_ctx()

static void quic_update_conn_ctx ( quicly_conn_t *  conn,
quicly_context_t *  quicly_context 
)
inlinestatic

Definition at line 1678 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_update_fifo_size()

static void quic_update_fifo_size ( )
static

Definition at line 2440 of file quic.c.

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

◆ quic_update_time()

static void quic_update_time ( f64  now,
u8  thread_index 
)
static

Definition at line 1087 of file quic.c.

+ Here is the call graph for this function:

◆ quic_update_timer()

static void quic_update_timer ( quic_ctx_t ctx)
static

Definition at line 1108 of file quic.c.

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

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

Variable Documentation

◆ on_closed_by_peer

static quicly_closed_by_peer_t on_closed_by_peer = { quic_on_closed_by_peer }
static

Definition at line 54 of file quic.c.

◆ on_stream_open

static quicly_stream_open_t on_stream_open = { quic_on_stream_open }
static

Definition at line 53 of file quic.c.

◆ quic_app_cb_vft

session_cb_vft_t quic_app_cb_vft
static
Initial value:
= {
.session_accept_callback = quic_udp_session_accepted_callback,
.session_disconnect_callback = quic_udp_session_disconnect_callback,
.session_connected_callback = quic_udp_session_connected_callback,
.session_reset_callback = quic_udp_session_reset_callback,
.session_migrate_callback = quic_udp_session_migrate_callback,
.add_segment_callback = quic_add_segment_callback,
.del_segment_callback = quic_del_segment_callback,
.builtin_app_rx_callback = quic_udp_session_rx_callback,
.session_cleanup_callback = quic_udp_session_cleanup_callback,
.app_cert_key_pair_delete_callback = quic_app_cert_key_pair_delete_callback,
}
int quic_udp_session_accepted_callback(session_t *udp_session)
Definition: quic.c:1879
static int quic_udp_session_rx_callback(session_t *udp_session)
Definition: quic.c:2226
static void quic_udp_session_reset_callback(session_t *s)
Definition: quic.c:1855
static void quic_udp_session_cleanup_callback(session_t *udp_session, session_cleanup_ntf_t ntf)
Definition: quic.c:1839
static int quic_udp_session_connected_callback(u32 quic_app_index, u32 ctx_index, session_t *udp_session, session_error_t err)
Definition: quic.c:1758
static int quic_app_cert_key_pair_delete_callback(app_cert_key_pair_t *ckpair)
Definition: quic.c:122
static int quic_add_segment_callback(u32 client_index, u64 seg_handle)
Definition: quic.c:1917
static void quic_udp_session_migrate_callback(session_t *s, session_handle_t new_sh)
Definition: quic.c:1861
static int quic_del_segment_callback(u32 client_index, u64 seg_handle)
Definition: quic.c:1924
static void quic_udp_session_disconnect_callback(session_t *s)
Definition: quic.c:1833

Definition at line 2388 of file quic.c.

◆ quic_crypto_engine

quicly_crypto_engine_t quic_crypto_engine

Definition at line 720 of file quic_crypto.c.

◆ quic_error_strings

char* quic_error_strings[]
static
Initial value:
= {
#define quic_error(n,s)
}

Definition at line 38 of file quic.c.

◆ quic_fifosize

u64 quic_fifosize = 0

Definition at line 2562 of file quic.c.

◆ quic_input_node

vlib_node_registration_t quic_input_node
Initial value:
=
{
.function = quic_node_fn,
.name = "quic-input",
.vector_size = sizeof (u32),
.error_strings = quic_error_strings,
}
static uword quic_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: quic.c:2906
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static char * quic_error_strings[]
Definition: quic.c:38
#define ARRAY_LEN(x)
Definition: clib.h:67

(constructor) VLIB_REGISTER_NODE (quic_input_node)

Definition at line 2913 of file quic.c.

◆ quic_list_crypto_context_command

vlib_cli_command_t quic_list_crypto_context_command
static
Initial value:
=
{
.path = "show quic crypto context",
.short_help = "list quic crypto contextes",
}
static clib_error_t * quic_list_crypto_context_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: quic.c:171

(constructor) VLIB_CLI_COMMAND (quic_list_crypto_context_command)

Definition at line 2849 of file quic.c.

◆ quic_main

quic_main_t quic_main

Definition at line 46 of file quic.c.

◆ quic_packet_allocator

quicly_packet_allocator_t quic_packet_allocator
Initial value:
=
static quicly_datagram_t * quic_alloc_packet(quicly_packet_allocator_t *self, size_t payloadsize)
Definition: quic.c:95
static void quic_free_packet(quicly_packet_allocator_t *self, quicly_datagram_t *packet)
Definition: quic.c:112

Definition at line 118 of file quic.c.

◆ quic_plugin_crypto_command

vlib_cli_command_t quic_plugin_crypto_command
static
Initial value:
=
{
.path = "quic set crypto api",
.short_help = "quic set crypto api [picotls, vpp]",
}
static clib_error_t * quic_plugin_crypto_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: quic.c:2544

(constructor) VLIB_CLI_COMMAND (quic_plugin_crypto_command)

Definition at line 2831 of file quic.c.

◆ quic_plugin_set_fifo_size_command

vlib_cli_command_t quic_plugin_set_fifo_size_command
static
Initial value:
=
{
.path = "quic set fifo-size",
.short_help = "quic set fifo-size N[K|M|G] (default 64K)",
}
static clib_error_t * quic_plugin_set_fifo_size_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: quic.c:2564

(constructor) VLIB_CLI_COMMAND (quic_plugin_set_fifo_size_command)

Definition at line 2837 of file quic.c.

◆ quic_proto

const transport_proto_vft_t quic_proto
static
Initial value:
= {
.connect = quic_connect,
.start_listen = quic_start_listen,
.stop_listen = quic_stop_listen,
.get_connection = quic_connection_get,
.get_listener = quic_listener_get,
.update_time = quic_update_time,
.format_connection = format_quic_connection,
.format_half_open = format_quic_half_open,
.format_listener = format_quic_listener,
.get_transport_endpoint = quic_get_transport_endpoint,
.get_transport_listener_endpoint = quic_get_transport_listener_endpoint,
.transport_options = {
.name = "quic",
.short_name = "Q",
.service_type = TRANSPORT_SERVICE_APP,
},
}
static u32 quic_stop_listen(u32 lctx_index)
Definition: quic.c:1485
static int quic_custom_app_rx_callback(transport_connection_t *tc)
Definition: quic.c:1931
static int quic_connect(transport_endpoint_cfg_t *tep)
Definition: quic.c:1344
static int quic_custom_tx_callback(void *s, transport_send_params_t *sp)
Definition: quic.c:1947
static void quic_proto_on_close(u32 ctx_index, u32 thread_index)
Definition: quic.c:1359
static transport_connection_t * quic_connection_get(u32 ctx_index, u32 thread_index)
Definition: quic.c:1506
static u32 quic_start_listen(u32 quic_listen_session_index, transport_endpoint_t *tep)
Definition: quic.c:1422
static u8 * format_quic_connection(u8 *s, va_list *args)
Definition: quic.c:1554
app transport service
static void quic_get_transport_listener_endpoint(u32 listener_index, transport_endpoint_t *tep, u8 is_lcl)
Definition: quic.c:2362
static void quic_update_time(f64 now, u8 thread_index)
Definition: quic.c:1087
static transport_connection_t * quic_listener_get(u32 listener_index)
Definition: quic.c:1514
apps acting as transports
static u8 * format_quic_listener(u8 *s, va_list *args)
Definition: quic.c:1577
static void quic_get_transport_endpoint(u32 ctx_index, u32 thread_index, transport_endpoint_t *tep, u8 is_lcl)
Definition: quic.c:2379
static u8 * format_quic_half_open(u8 *s, va_list *args)
Definition: quic.c:1565

Definition at line 2401 of file quic.c.

◆ quic_set_max_packets_per_key

vlib_cli_command_t quic_set_max_packets_per_key
static
Initial value:
=
{
.path = "set quic max_packets_per_key",
.short_help = "set quic max_packets_per_key 16777216",
}
static clib_error_t * quic_set_max_packets_per_key_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: quic.c:191

(constructor) VLIB_CLI_COMMAND (quic_set_max_packets_per_key)

Definition at line 2855 of file quic.c.

◆ quic_show_ctx_command

vlib_cli_command_t quic_show_ctx_command
static
Initial value:
=
{
.path = "show quic",
.short_help = "show quic",
}
static clib_error_t * quic_show_connections_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: quic.c:2775

(constructor) VLIB_CLI_COMMAND (quic_show_ctx_command)

Definition at line 2843 of file quic.c.

◆ quic_stream_callbacks

const quicly_stream_callbacks_t quic_stream_callbacks
static
Initial value:
= {
.on_destroy = quic_on_stream_destroy,
.on_send_shift = quic_fifo_egress_shift,
.on_send_emit = quic_fifo_egress_emit,
.on_send_stop = quic_on_stop_sending,
.on_receive = quic_on_receive,
.on_receive_reset = quic_on_receive_reset
}
static void quic_on_stop_sending(quicly_stream_t *stream, int err)
Definition: quic.c:788
void quic_fifo_egress_emit(quicly_stream_t *stream, size_t off, void *dst, size_t *len, int *wrote_all)
Definition: quic.c:919
static void quic_on_receive_reset(quicly_stream_t *stream, int err)
Definition: quic.c:803
static void quic_on_receive(quicly_stream_t *stream, size_t off, const void *src, size_t len)
Definition: quic.c:818
void quic_fifo_egress_shift(quicly_stream_t *stream, size_t delta)
Definition: quic.c:896
static void quic_on_stream_destroy(quicly_stream_t *stream, int err)
Definition: quic.c:769

Definition at line 953 of file quic.c.

◆ quicly_vpp_now_cb

static quicly_now_t quicly_vpp_now_cb = { quic_get_time }
static

Definition at line 55 of file quic.c.