From: Pablo de Lara Date: Tue, 14 Aug 2018 00:53:30 +0000 (+0100) Subject: crypto/aesni_gcm: remove unneeded J0 calculation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c7c29f105876f2b60a0a816d45ae5a45d50128f6;p=dpdk.git crypto/aesni_gcm: remove unneeded J0 calculation When IV size is 12, padding to 16 bytes is required and the LSB must be set to 1, according to the spec. However, the Multi-buffer library is already doing this, so it is not necessary to do it in the PMD. Signed-off-by: Pablo de Lara Acked-by: Marko Kovacevic --- diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c index 752e0cd6a0..4fba49ea81 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c @@ -225,17 +225,8 @@ process_gcm_crypto_op(struct aesni_gcm_qp *qp, struct rte_crypto_op *op, iv_ptr = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset); - /* - * GCM working in 12B IV mode => 16B pre-counter block we need - * to set BE LSB to 1, driver expects that 16B is allocated - */ - if (session->iv.length == 12) { - uint32_t *iv_padd = (uint32_t *)&(iv_ptr[12]); - *iv_padd = rte_bswap32(1); - } if (session->op == AESNI_GCM_OP_AUTHENTICATED_ENCRYPTION) { - qp->ops[session->key].init(&session->gdata_key, &qp->gdata_ctx, iv_ptr,