FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
tls_picotls.c File Reference
+ Include dependency graph for tls_picotls.c:

Go to the source code of this file.

Macros

#define MAX_QUEUE   12000
 
#define PTLS_MAX_PLAINTEXT_RECORD_SIZE   16384
 

Functions

static u32 picotls_ctx_alloc (void)
 
static void picotls_ctx_free (tls_ctx_t *ctx)
 
static u32 picotls_listen_ctx_alloc (void)
 
static void picotls_listen_ctx_free (picotls_listen_ctx_t *lctx)
 
tls_ctx_tpicotls_ctx_get (u32 ctx_index)
 
picotls_listen_ctx_tpicotls_lctx_get (u32 lctx_index)
 
static u8 picotls_handshake_is_over (tls_ctx_t *ctx)
 
static int picotls_try_handshake_write (picotls_ctx_t *ptls_ctx, session_t *tls_session, ptls_buffer_t *buf)
 
static int picotls_start_listen (tls_ctx_t *lctx)
 
static int picotls_stop_listen (tls_ctx_t *lctx)
 
static void picotls_handle_handshake_failure (tls_ctx_t *ctx)
 
static void picotls_confirm_app_close (tls_ctx_t *ctx)
 
static int picotls_transport_close (tls_ctx_t *ctx)
 
static int picotls_app_close (tls_ctx_t *ctx)
 
static int picotls_do_handshake (picotls_ctx_t *ptls_ctx, session_t *tls_session, u8 *input, int input_len)
 
static int picotls_ctx_read (tls_ctx_t *ctx, session_t *tls_session)
 
static int picotls_content_process (picotls_ctx_t *ptls_ctx, svm_fifo_t *src_fifo, svm_fifo_t *dst_fifo, int content_len, int total_record_overhead, int is_no_copy)
 
static int picotls_ctx_write (tls_ctx_t *ctx, session_t *app_session, transport_send_params_t *sp)
 
static int picotls_ctx_init_server (tls_ctx_t *ctx)
 
static int picotls_ctx_init_client (tls_ctx_t *ctx)
 
tls_ctx_tpicotls_ctx_get_w_thread (u32 ctx_index, u8 thread_index)
 
int picotls_init_client_ptls_ctx (ptls_context_t **client_ptls_ctx)
 
static clib_error_ttls_picotls_init (vlib_main_t *vm)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

picotls_main_t picotls_main
 
static ptls_key_exchange_algorithm_t * default_key_exchange []
 
const static tls_engine_vft_t picotls_engine
 

Macro Definition Documentation

◆ MAX_QUEUE

#define MAX_QUEUE   12000

Definition at line 9 of file tls_picotls.c.

◆ PTLS_MAX_PLAINTEXT_RECORD_SIZE

#define PTLS_MAX_PLAINTEXT_RECORD_SIZE   16384

Definition at line 10 of file tls_picotls.c.

Function Documentation

◆ picotls_app_close()

static int picotls_app_close ( tls_ctx_t ctx)
static

Definition at line 210 of file tls_picotls.c.

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

◆ picotls_confirm_app_close()

static void picotls_confirm_app_close ( tls_ctx_t ctx)
static

Definition at line 189 of file tls_picotls.c.

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

◆ picotls_content_process()

static int picotls_content_process ( picotls_ctx_t ptls_ctx,
svm_fifo_t src_fifo,
svm_fifo_t dst_fifo,
int  content_len,
int  total_record_overhead,
int  is_no_copy 
)
inlinestatic

Definition at line 381 of file tls_picotls.c.

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

◆ picotls_ctx_alloc()

static u32 picotls_ctx_alloc ( void  )
static

Definition at line 28 of file tls_picotls.c.

+ Here is the call graph for this function:

◆ picotls_ctx_free()

static void picotls_ctx_free ( tls_ctx_t ctx)
static

Definition at line 47 of file tls_picotls.c.

◆ picotls_ctx_get()

tls_ctx_t* picotls_ctx_get ( u32  ctx_index)

Definition at line 76 of file tls_picotls.c.

+ Here is the call graph for this function:

◆ picotls_ctx_get_w_thread()

tls_ctx_t* picotls_ctx_get_w_thread ( u32  ctx_index,
u8  thread_index 
)

Definition at line 582 of file tls_picotls.c.

◆ picotls_ctx_init_client()

static int picotls_ctx_init_client ( tls_ctx_t ctx)
static

Definition at line 546 of file tls_picotls.c.

+ Here is the call graph for this function:

◆ picotls_ctx_init_server()

static int picotls_ctx_init_server ( tls_ctx_t ctx)
static

Definition at line 524 of file tls_picotls.c.

+ Here is the call graph for this function:

◆ picotls_ctx_read()

static int picotls_ctx_read ( tls_ctx_t ctx,
session_t tls_session 
)
inlinestatic

Definition at line 257 of file tls_picotls.c.

+ Here is the call graph for this function:

◆ picotls_ctx_write()

static int picotls_ctx_write ( tls_ctx_t ctx,
session_t app_session,
transport_send_params_t sp 
)
inlinestatic

There is no engough enqueue space for one record

Allowed to execute no-copy crypto operation

Definition at line 416 of file tls_picotls.c.

+ Here is the call graph for this function:

◆ picotls_do_handshake()

static int picotls_do_handshake ( picotls_ctx_t ptls_ctx,
session_t tls_session,
u8 input,
int  input_len 
)
inlinestatic

Definition at line 224 of file tls_picotls.c.

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

◆ picotls_handle_handshake_failure()

static void picotls_handle_handshake_failure ( tls_ctx_t ctx)
static

Definition at line 180 of file tls_picotls.c.

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

◆ picotls_handshake_is_over()

static u8 picotls_handshake_is_over ( tls_ctx_t ctx)
static

Definition at line 92 of file tls_picotls.c.

+ Here is the caller graph for this function:

◆ picotls_init_client_ptls_ctx()

int picotls_init_client_ptls_ctx ( ptls_context_t **  client_ptls_ctx)

Definition at line 590 of file tls_picotls.c.

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

◆ picotls_lctx_get()

picotls_listen_ctx_t* picotls_lctx_get ( u32  lctx_index)

Definition at line 86 of file tls_picotls.c.

+ Here is the caller graph for this function:

◆ picotls_listen_ctx_alloc()

static u32 picotls_listen_ctx_alloc ( void  )
static

Definition at line 57 of file tls_picotls.c.

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

◆ picotls_listen_ctx_free()

static void picotls_listen_ctx_free ( picotls_listen_ctx_t lctx)
static

Definition at line 70 of file tls_picotls.c.

+ Here is the caller graph for this function:

◆ picotls_start_listen()

static int picotls_start_listen ( tls_ctx_t lctx)
static

Definition at line 125 of file tls_picotls.c.

+ Here is the call graph for this function:

◆ picotls_stop_listen()

static int picotls_stop_listen ( tls_ctx_t lctx)
static

Definition at line 166 of file tls_picotls.c.

+ Here is the call graph for this function:

◆ picotls_transport_close()

static int picotls_transport_close ( tls_ctx_t ctx)
static

Definition at line 196 of file tls_picotls.c.

+ Here is the call graph for this function:

◆ picotls_try_handshake_write()

static int picotls_try_handshake_write ( picotls_ctx_t ptls_ctx,
session_t tls_session,
ptls_buffer_t *  buf 
)
static

Definition at line 100 of file tls_picotls.c.

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

◆ tls_picotls_init()

static clib_error_t* tls_picotls_init ( vlib_main_t vm)
static

Definition at line 621 of file tls_picotls.c.

+ Here is the call graph for this function:

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

Variable Documentation

◆ default_key_exchange

ptls_key_exchange_algorithm_t* default_key_exchange[]
static
Initial value:
= {
}

Definition at line 12 of file tls_picotls.c.

◆ picotls_engine

const static tls_engine_vft_t picotls_engine
static
Initial value:
= {
.ctx_alloc = picotls_ctx_alloc,
.ctx_free = picotls_ctx_free,
.ctx_get = picotls_ctx_get,
.ctx_get_w_thread = picotls_ctx_get_w_thread,
.ctx_handshake_is_over = picotls_handshake_is_over,
.ctx_start_listen = picotls_start_listen,
.ctx_stop_listen = picotls_stop_listen,
.ctx_init_server = picotls_ctx_init_server,
.ctx_init_client = picotls_ctx_init_client,
.ctx_read = picotls_ctx_read,
.ctx_write = picotls_ctx_write,
.ctx_transport_close = picotls_transport_close,
.ctx_app_close = picotls_app_close,
}

Definition at line 604 of file tls_picotls.c.

◆ picotls_main

picotls_main_t picotls_main

Definition at line 7 of file tls_picotls.c.

picotls_ctx_init_server
static int picotls_ctx_init_server(tls_ctx_t *ctx)
Definition: tls_picotls.c:524
picotls_app_close
static int picotls_app_close(tls_ctx_t *ctx)
Definition: tls_picotls.c:210
picotls_handshake_is_over
static u8 picotls_handshake_is_over(tls_ctx_t *ctx)
Definition: tls_picotls.c:92
picotls_ctx_get_w_thread
tls_ctx_t * picotls_ctx_get_w_thread(u32 ctx_index, u8 thread_index)
Definition: tls_picotls.c:582
picotls_ctx_get
tls_ctx_t * picotls_ctx_get(u32 ctx_index)
Definition: tls_picotls.c:76
picotls_transport_close
static int picotls_transport_close(tls_ctx_t *ctx)
Definition: tls_picotls.c:196
picotls_ctx_alloc
static u32 picotls_ctx_alloc(void)
Definition: tls_picotls.c:28
picotls_ctx_init_client
static int picotls_ctx_init_client(tls_ctx_t *ctx)
Definition: tls_picotls.c:546
picotls_start_listen
static int picotls_start_listen(tls_ctx_t *lctx)
Definition: tls_picotls.c:125
picotls_ctx_write
static int picotls_ctx_write(tls_ctx_t *ctx, session_t *app_session, transport_send_params_t *sp)
Definition: tls_picotls.c:416
picotls_stop_listen
static int picotls_stop_listen(tls_ctx_t *lctx)
Definition: tls_picotls.c:166
picotls_ctx_read
static int picotls_ctx_read(tls_ctx_t *ctx, session_t *tls_session)
Definition: tls_picotls.c:257
picotls_ctx_free
static void picotls_ctx_free(tls_ctx_t *ctx)
Definition: tls_picotls.c:47