This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 917fc52047793ac2e9c815e50522fcdd862be535 Author: makejian <[email protected]> AuthorDate: Wed Jul 30 19:50:52 2025 +0800 include/crypto/virtio_crypto.h: remove virtio_crypto_get_iv_len() cryptodev passes the IV length with each request, so the driver no longer needs to derive it from the algorithm. Signed-off-by: makejian <[email protected]> --- include/crypto/virtio_crypto.h | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/include/crypto/virtio_crypto.h b/include/crypto/virtio_crypto.h index feb0a9a74d3..ca7589a4801 100644 --- a/include/crypto/virtio_crypto.h +++ b/include/crypto/virtio_crypto.h @@ -96,37 +96,6 @@ int virtio_crypto_get_tag_len(int valg) return -EINVAL; } -static inline_function -int virtio_crypto_get_iv_len(int vservice, int valg) -{ - if (vservice == VIRTIO_CRYPTO_SERVICE_CIPHER) - { - switch (valg) - { - case VIRTIO_CRYPTO_CIPHER_3DES_CBC: - return VIRTIO_CRYPTO_DES_IV_LEN; - case VIRTIO_CRYPTO_CIPHER_AES_CBC: - case VIRTIO_CRYPTO_CIPHER_AES_CTR: - case VIRTIO_CRYPTO_CIPHER_AES_XTS: - return VIRTIO_CRYPTO_AES_IV_LEN; - } - } - else if (vservice = VIRTIO_CRYPTO_SERVICE_AEAD) - { - switch (valg) - { - case VIRTIO_CRYPTO_AEAD_GCM: - return VIRTIO_CRYPTO_GCM_IV_LEN; - case VIRTIO_CRYPTO_AEAD_CCM: - return VIRTIO_CRYPTO_CCM_IV_LEN; - case VIRTIO_CRYPTO_AEAD_CHACHA20_POLY1305: - return VIRTIO_CRYPTO_CHACHAPOLY_IV_LEN; - } - } - - return 0; -} - static inline_function int virtio_crypto_get_auth_key_len(int valg) {
