summaryrefslogtreecommitdiffstats
path: root/src/plugins/tlspicotls/tls_picotls.h
diff options
context:
space:
mode:
authorSimon Zhang <yuwei1.zhang@intel.com>2020-01-13 00:59:08 +0800
committerFlorin Coras <florin.coras@gmail.com>2020-02-11 16:11:13 +0000
commit619179cfcdb087acb0864d273c4fbd3b7396974c (patch)
tree7e2c0741a025741a4d4d3191d7ddb16c0f97bc5c /src/plugins/tlspicotls/tls_picotls.h
parent6fe8998fefdc900af714a23d4152ffef9edbd3b4 (diff)
tls: refactor picotls ctx_read process to improve CPS
Type: refactor Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> Change-Id: I2bb675b4df3c4151f4b0791efcfe05b1d0f87a33 Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Diffstat (limited to 'src/plugins/tlspicotls/tls_picotls.h')
-rw-r--r--src/plugins/tlspicotls/tls_picotls.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/tlspicotls/tls_picotls.h b/src/plugins/tlspicotls/tls_picotls.h
index 835f4a6b071..b8e802eb551 100644
--- a/src/plugins/tlspicotls/tls_picotls.h
+++ b/src/plugins/tlspicotls/tls_picotls.h
@@ -7,6 +7,12 @@
#include <vnet/tls/tls.h>
#include <vpp/app/version.h>
+#define TLS_RX_LEN(x) ((x)->rx_content + (x)->rx_len)
+#define TLS_RX_OFFSET(x) ((x)->rx_content + (x)->rx_offset)
+#define TLS_RX_IS_LEFT(x) ((x)->rx_len != (x)->rx_offset)
+#define TLS_RX_LEFT_LEN(x) ((x)->rx_len - (x)->rx_offset)
+
+
typedef struct tls_ctx_picotls_
{
tls_ctx_t ctx;