diff options
author | Damjan Marion <damarion@cisco.com> | 2024-02-26 16:19:56 +0000 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2024-03-01 15:33:53 +0000 |
commit | 242fe13c62fe75fff0fa4d9ade0af0eec740d30f (patch) | |
tree | 6a42435f482f4f09cce539a22d5f9442a4eaa2b5 /src | |
parent | 46bddc3b4a2c592b056a45c6a2b2f71e7f84fb6d (diff) |
crypto-native: fix AES-CBC encrypt loop
Type: fix
Change-Id: I11cc52ff3867277e6591efb061f96cadfcc70c88
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/crypto_native/aes_cbc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/crypto_native/aes_cbc.c b/src/plugins/crypto_native/aes_cbc.c index f2d700a0796..c84390c3108 100644 --- a/src/plugins/crypto_native/aes_cbc.c +++ b/src/plugins/crypto_native/aes_cbc.c @@ -55,17 +55,17 @@ aes_ops_enc_aes_cbc (vlib_main_t * vm, vnet_crypto_op_t * ops[], u32 i, j, count, n_left = n_ops; u32xN placeholder_mask = { }; u32xN len = { }; - vnet_crypto_key_index_t key_index[N_AES_BYTES]; - u8 *src[N_AES_BYTES] = {}; - u8 *dst[N_AES_BYTES] = {}; + vnet_crypto_key_index_t key_index[4 * N_AES_LANES]; + u8 *src[4 * N_AES_LANES] = {}; + u8 *dst[4 * N_AES_LANES] = {}; u8xN r[4] = {}; u8xN k[15][4] = {}; - for (i = 0; i < N_AES_BYTES; i++) + for (i = 0; i < 4 * N_AES_LANES; i++) key_index[i] = ~0; more: - for (i = 0; i < N_AES_BYTES; i++) + for (i = 0; i < 4 * N_AES_LANES; i++) if (len[i] == 0) { if (n_left == 0) @@ -198,7 +198,7 @@ more: len -= u32xN_splat (count); - for (i = 0; i < N_AES_BYTES; i++) + for (i = 0; i < 4 * N_AES_LANES; i++) { src[i] += count; dst[i] += count; |