diff options
author | Florin Coras <fcoras@cisco.com> | 2021-08-04 18:20:24 -0700 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2021-08-10 18:43:32 +0000 |
commit | 74f0f97ddfd9ce079d68bb333d2206a789a36b6c (patch) | |
tree | a58f61071214d05093c78878be8a5e7328674fd2 /src/plugins/tlspicotls/tls_picotls.h | |
parent | 1433185908daf98deb0a8f43c303b99382a87442 (diff) |
tls: picotls optimize writes
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I76a1cd516849cfe5bc87ed2b3707c6f2257126d2
Diffstat (limited to 'src/plugins/tlspicotls/tls_picotls.h')
-rw-r--r-- | src/plugins/tlspicotls/tls_picotls.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/tlspicotls/tls_picotls.h b/src/plugins/tlspicotls/tls_picotls.h index e86b30aedfc..d24d7e2f172 100644 --- a/src/plugins/tlspicotls/tls_picotls.h +++ b/src/plugins/tlspicotls/tls_picotls.h @@ -16,9 +16,7 @@ #define TLS_READ_IS_LEFT(x) ((x)->read_buffer.off != 0 && (x)->read_buffer.off != (x)->read_buffer_offset) #define TLS_READ_LEFT_LEN(x) ((x)->read_buffer.off - (x)->read_buffer_offset) -#define TLS_WRITE_OFFSET(x) ((x)->write_buffer.base + (x)->write_buffer_offset) -#define TLS_WRITE_IS_LEFT(x) ((x)->write_buffer.off != 0 && (x)->write_buffer.off != (x)->write_buffer_offset) - +#define TLSP_MIN_ENQ_SPACE (1 << 16) typedef struct tls_ctx_picotls_ { @@ -29,10 +27,7 @@ typedef struct tls_ctx_picotls_ int rx_offset; int rx_len; ptls_buffer_t read_buffer; - ptls_buffer_t write_buffer; - uint8_t *write_content; int read_buffer_offset; - int write_buffer_offset; } picotls_ctx_t; typedef struct tls_listen_ctx_picotls_ @@ -44,8 +39,9 @@ typedef struct tls_listen_ctx_picotls_ typedef struct picotls_main_ { picotls_ctx_t ***ctx_pool; - u8 **rx_bufs; picotls_listen_ctx_t *lctx_pool; + u8 **tx_bufs; + u8 **rx_bufs; ptls_context_t *client_ptls_ctx; clib_rwlock_t crypto_keys_rw_lock; } picotls_main_t; |