DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] crypto/aesni_gcm: remove unneeded J0 calculation
@ 2018-08-14  0:53 Pablo de Lara
  2018-08-24 12:55 ` Kovacevic, Marko
  2018-09-26 12:27 ` Akhil Goyal
  0 siblings, 2 replies; 3+ messages in thread
From: Pablo de Lara @ 2018-08-14  0:53 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev, Pablo de Lara

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 <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 9b4d1f630..ebdf7c35a 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -240,17 +240,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,
-- 
2.17.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] crypto/aesni_gcm: remove unneeded J0 calculation
  2018-08-14  0:53 [dpdk-dev] [PATCH] crypto/aesni_gcm: remove unneeded J0 calculation Pablo de Lara
@ 2018-08-24 12:55 ` Kovacevic, Marko
  2018-09-26 12:27 ` Akhil Goyal
  1 sibling, 0 replies; 3+ messages in thread
From: Kovacevic, Marko @ 2018-08-24 12:55 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev, De Lara Guarch, Pablo

> 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 <pablo.de.lara.guarch@intel.com>
> ---
>  drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 

Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] crypto/aesni_gcm: remove unneeded J0 calculation
  2018-08-14  0:53 [dpdk-dev] [PATCH] crypto/aesni_gcm: remove unneeded J0 calculation Pablo de Lara
  2018-08-24 12:55 ` Kovacevic, Marko
@ 2018-09-26 12:27 ` Akhil Goyal
  1 sibling, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2018-09-26 12:27 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty; +Cc: dev



On 8/14/2018 6:23 AM, Pablo de Lara wrote:
> 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 <pablo.de.lara.guarch@intel.com>
> ---
>
Applied to dpdk-next-crypto

Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-26 12:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-14  0:53 [dpdk-dev] [PATCH] crypto/aesni_gcm: remove unneeded J0 calculation Pablo de Lara
2018-08-24 12:55 ` Kovacevic, Marko
2018-09-26 12:27 ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).