diff options
author | Gabriel Oginski <gabrielx.oginski@intel.com> | 2021-11-25 08:21:41 +0000 |
---|---|---|
committer | Fan Zhang <roy.fan.zhang@intel.com> | 2022-01-24 11:01:51 +0000 |
commit | 4634d02501235d3803a17839eeaf076110abcb18 (patch) | |
tree | 6ff75f5f965ba0274e9409efcbaefced47d46438 /src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c | |
parent | afe31562a1ed873bee8e1abb3b18df27d1a09ba3 (diff) |
dpdk-cryptodev: add support chacha20-poly1305
Originally cryptodev doesn't support chacha20-poly1305 with aad length
0.
This patch add support in cryptodev for chacha20-poly1305 with aad
length 0. This length is using in Wireguard.
Type: improvement
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I0608920bb557d7d071e7f9f37c80cf50bad81dcc
Diffstat (limited to 'src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c')
-rw-r--r-- | src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c b/src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c index 47cc15aaaff..55be79c5dc5 100644 --- a/src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c +++ b/src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c @@ -459,6 +459,13 @@ cryptodev_frame_dequeue (vlib_main_t *vm, u32 *nb_elts_processed, } static_always_inline int +cryptodev_enqueue_aead_aad_0_enc (vlib_main_t *vm, + vnet_crypto_async_frame_t *frame) +{ + return cryptodev_frame_aead_enqueue (vm, frame, CRYPTODEV_OP_TYPE_ENCRYPT, + 0); +} +static_always_inline int cryptodev_enqueue_aead_aad_8_enc (vlib_main_t *vm, vnet_crypto_async_frame_t *frame) { @@ -474,6 +481,13 @@ cryptodev_enqueue_aead_aad_12_enc (vlib_main_t *vm, } static_always_inline int +cryptodev_enqueue_aead_aad_0_dec (vlib_main_t *vm, + vnet_crypto_async_frame_t *frame) +{ + return cryptodev_frame_aead_enqueue (vm, frame, CRYPTODEV_OP_TYPE_DECRYPT, + 0); +} +static_always_inline int cryptodev_enqueue_aead_aad_8_dec (vlib_main_t *vm, vnet_crypto_async_frame_t *frame) { |