summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/crypto/crypto.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vnet/crypto/crypto.h b/src/vnet/crypto/crypto.h
index 07a73f14d04..fdda571d054 100644
--- a/src/vnet/crypto/crypto.h
+++ b/src/vnet/crypto/crypto.h
@@ -566,13 +566,15 @@ vnet_crypto_async_submit_open_frame (vlib_main_t * vm,
vnet_crypto_async_op_id_t opt = frame->op;
u32 i = vlib_num_workers () > 0;
- int ret = (cm->enqueue_handlers[frame->op]) (vm, frame);
+ frame->state = VNET_CRYPTO_FRAME_STATE_PENDING;
frame->enqueue_thread_index = vm->thread_index;
+
+ int ret = (cm->enqueue_handlers[frame->op]) (vm, frame);
+
clib_bitmap_set_no_check (cm->async_active_ids, opt, 1);
if (PREDICT_TRUE (ret == 0))
{
vnet_crypto_async_frame_t *nf = 0;
- frame->state = VNET_CRYPTO_FRAME_STATE_PENDING;
pool_get_aligned (ct->frame_pool, nf, CLIB_CACHE_LINE_BYTES);
if (CLIB_DEBUG > 0)
clib_memset (nf, 0xfe, sizeof (*nf));
@@ -581,6 +583,10 @@ vnet_crypto_async_submit_open_frame (vlib_main_t * vm,
nf->n_elts = 0;
ct->frames[opt] = nf;
}
+ else
+ {
+ frame->state = VNET_CRYPTO_FRAME_STATE_ELT_ERROR;
+ }
if (cm->dispatch_mode == VNET_CRYPTO_ASYNC_DISPATCH_INTERRUPT)
{