diff options
author | Piotr Bronowski <piotrx.bronowski@intel.com> | 2023-06-09 15:08:54 +0000 |
---|---|---|
committer | Fan Zhang <fanzhang.oss@gmail.com> | 2023-06-19 18:12:09 +0000 |
commit | f0c67adfb27f6a6a37ccea7e359a416ecdf01825 (patch) | |
tree | a755f1eb82b6346aeb194126262c28175326c1a2 /src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c | |
parent | 30ecfa8ceb884771ba4e3f1da6da8fc07efa6c17 (diff) |
dpdk-cryptodev: enq/deq scheme rework
This rework tries to address issues found on SPR QAT, for traffic
reaching max possible throughoutput for single QAT PF packet drops were
observed.
Fix changes enq/deq scheme by utilizing software ring in enq call from
VNET but enq and deq to QAT happens only in deq callback function what
should enable better utlization of hardware resources.
Type: improvement
Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com>
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I2e8c473d20a269fd5e93f0c8d1f8c8aa193712bd
Diffstat (limited to 'src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c')
-rw-r--r-- | src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c b/src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c index 66c0c168234..2f0599c7bd3 100644 --- a/src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c +++ b/src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c @@ -140,7 +140,8 @@ cryptodev_frame_linked_algs_enqueue (vlib_main_t *vm, if (PREDICT_FALSE (CRYPTODEV_NB_CRYPTO_OPS - cet->inflight < n_elts)) { cryptodev_mark_frame_err_status (frame, - VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR); + VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR, + VNET_CRYPTO_FRAME_STATE_NOT_PROCESSED); return -1; } @@ -148,7 +149,8 @@ cryptodev_frame_linked_algs_enqueue (vlib_main_t *vm, rte_mempool_get_bulk (cet->cop_pool, (void **) cet->cops, n_elts) < 0)) { cryptodev_mark_frame_err_status (frame, - VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR); + VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR, + VNET_CRYPTO_FRAME_STATE_NOT_PROCESSED); return -1; } @@ -184,7 +186,8 @@ cryptodev_frame_linked_algs_enqueue (vlib_main_t *vm, cryptodev_session_create (vm, last_key_index, 0) < 0)) { cryptodev_mark_frame_err_status ( - frame, VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR); + frame, VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR, + VNET_CRYPTO_FRAME_STATE_NOT_PROCESSED); return -1; } } @@ -259,7 +262,8 @@ cryptodev_frame_aead_enqueue (vlib_main_t *vm, if (PREDICT_FALSE (CRYPTODEV_MAX_INFLIGHT - cet->inflight < n_elts)) { cryptodev_mark_frame_err_status (frame, - VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR); + VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR, + VNET_CRYPTO_FRAME_STATE_NOT_PROCESSED); return -1; } @@ -267,7 +271,8 @@ cryptodev_frame_aead_enqueue (vlib_main_t *vm, rte_mempool_get_bulk (cet->cop_pool, (void **) cet->cops, n_elts) < 0)) { cryptodev_mark_frame_err_status (frame, - VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR); + VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR, + VNET_CRYPTO_FRAME_STATE_NOT_PROCESSED); return -1; } @@ -301,7 +306,8 @@ cryptodev_frame_aead_enqueue (vlib_main_t *vm, aad_len) < 0)) { cryptodev_mark_frame_err_status ( - frame, VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR); + frame, VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR, + VNET_CRYPTO_FRAME_STATE_NOT_PROCESSED); return -1; } } @@ -320,7 +326,8 @@ cryptodev_frame_aead_enqueue (vlib_main_t *vm, aad_len) < 0)) { cryptodev_mark_frame_err_status ( - frame, VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR); + frame, VNET_CRYPTO_OP_STATUS_FAIL_ENGINE_ERR, + VNET_CRYPTO_FRAME_STATE_NOT_PROCESSED); return -1; } } |