From ef69b5103438ec099cf080b54a88a5333b1c055b Mon Sep 17 00:00:00 2001 From: PiotrX Kleski Date: Tue, 24 Nov 2020 08:26:26 +0000 Subject: crypto: fixed async frame enqueue race condition Type: fix To avoid race condition happening in async crypto engines, async frame state and thread index set should happen before enqueue. In addition as the enqueue handler already returns the enqueue status, when an enqueue is failed, the async crypto engine shall not worry about setting the async frame state but let the submit_open_frame function to do just that. Signed-off-by: PiotrX Kleski Reviewed-by: Fan Zhang Change-Id: Ic1b0c94478b3cfd5fab98657218bbd70c46a220a --- src/plugins/dpdk/cryptodev/cryptodev.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/plugins/dpdk') diff --git a/src/plugins/dpdk/cryptodev/cryptodev.c b/src/plugins/dpdk/cryptodev/cryptodev.c index f58b54634a7..f51a5a527dc 100644 --- a/src/plugins/dpdk/cryptodev/cryptodev.c +++ b/src/plugins/dpdk/cryptodev/cryptodev.c @@ -412,7 +412,6 @@ cryptodev_mark_frame_err_status (vnet_crypto_async_frame_t * f, for (i = 0; i < n_elts; i++) f->elts[i].status = s; - f->state = VNET_CRYPTO_FRAME_STATE_ELT_ERROR; } static_always_inline rte_iova_t -- cgit 1.2.3-korg