From: Matthew Smith Date: Tue, 8 Apr 2025 14:41:31 +0000 (+0000) Subject: dpdk: fix key length for linked crypto algs X-Git-Tag: v25.10-rc0~99 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F39%2F42739%2F2;p=vpp.git dpdk: fix key length for linked crypto algs Change to key storage in vnet crypto was not propagated to linked algs in dpdk cryptodev code. There is an explicit key length field now instead of using vec_len() on the key data. Type: fix Fixes: 6676d95169 Signed-off-by: Matthew Smith Change-Id: I27fbfa5b2da3db0930cf2b2f2addd00d7400c74d --- diff --git a/src/plugins/dpdk/cryptodev/cryptodev.c b/src/plugins/dpdk/cryptodev/cryptodev.c index c60f9c886ff..a8817a1ec08 100644 --- a/src/plugins/dpdk/cryptodev/cryptodev.c +++ b/src/plugins/dpdk/cryptodev/cryptodev.c @@ -128,14 +128,14 @@ prepare_linked_xform (struct rte_crypto_sym_xform *xforms, xform_cipher->cipher.algo = cipher_algo; xform_cipher->cipher.key.data = key_cipher->data; - xform_cipher->cipher.key.length = vec_len (key_cipher->data); + xform_cipher->cipher.key.length = key_cipher->length; xform_cipher->cipher.iv.length = 16; xform_cipher->cipher.iv.offset = CRYPTODEV_IV_OFFSET; xform_auth->auth.algo = auth_algo; xform_auth->auth.digest_length = digest_len; xform_auth->auth.key.data = key_auth->data; - xform_auth->auth.key.length = vec_len (key_auth->data); + xform_auth->auth.key.length = key_auth->length; return 0; }