hsa: support configurable vcl client wrk loop
[vpp.git] / src / plugins / tlsmbedtls / tls_mbedtls.c
index 8ac736a..8d6b7ac 100644 (file)
@@ -431,7 +431,8 @@ mbedtls_ctx_handshake_rx (tls_ctx_t * ctx)
 }
 
 static int
-mbedtls_ctx_write (tls_ctx_t * ctx, session_t * app_session, u32 max_write)
+mbedtls_ctx_write (tls_ctx_t * ctx, session_t * app_session,
+                  transport_send_params_t * sp)
 {
   mbedtls_ctx_t *mc = (mbedtls_ctx_t *) ctx;
   u8 thread_index = ctx->c_thread_index;
@@ -446,7 +447,7 @@ mbedtls_ctx_write (tls_ctx_t * ctx, session_t * app_session, u32 max_write)
   if (!deq_max)
     return 0;
 
-  deq_max = clib_min (deq_max, max_write);
+  deq_max = clib_min (deq_max, sp->max_burst_size);
   tls_session = session_get_from_handle (ctx->tls_session_handle);
   enq_max = svm_fifo_max_enqueue_prod (tls_session->tx_fifo);
   deq_now = clib_min (deq_max, TLS_CHUNK_SIZE);
@@ -557,6 +558,13 @@ mbedtls_app_close (tls_ctx_t * ctx)
   return 0;
 }
 
+static int
+mbedtls_reinit_ca_chain (void)
+{
+  /* Not supported Yet */
+  return 0;
+}
+
 const static tls_engine_vft_t mbedtls_engine = {
   .ctx_alloc = mbedtls_ctx_alloc,
   .ctx_free = mbedtls_ctx_free,
@@ -571,6 +579,7 @@ const static tls_engine_vft_t mbedtls_engine = {
   .ctx_stop_listen = mbedtls_stop_listen,
   .ctx_transport_close = mbedtls_transport_close,
   .ctx_app_close = mbedtls_app_close,
+  .ctx_reinit_cachain = mbedtls_reinit_ca_chain,
 };
 
 int