[dpdk-dev] crypto/qat: fix AES-GMAC length of data
Checks
Commit Message
Fix AES-GMAC length of the data copied to the hardware to avoid
copying more data than necessary.
Fixes: 2fa64f840d65 ("crypto/qat: add GMAC capability")
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
drivers/crypto/qat/qat_crypto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Tuesday, July 11, 2017 2:36 PM
> To: dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;
> Griffin, John <john.griffin@intel.com>; Jain, Deepak K <deepak.k.jain@intel.com>; Singh, Abhinav
> <abhinav.singh@intel.com>; Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH] crypto/qat: fix AES-GMAC length of data
>
> Fix AES-GMAC length of the data copied to the hardware to avoid
> copying more data than necessary.
>
> Fixes: 2fa64f840d65 ("crypto/qat: add GMAC capability")
>
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -1363,10 +1363,10 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg,
if (!do_aead) {
qat_req->comn_mid.dst_length =
qat_req->comn_mid.src_length =
- rte_pktmbuf_data_len(op->sym->m_src);
+ op->sym->auth.data.length;
auth_param->u1.aad_adr = 0;
auth_param->auth_len = op->sym->auth.data.length;
- auth_param->auth_off = op->sym->auth.data.offset;
+ auth_param->auth_off = 0;
auth_param->u2.aad_sz = 0;
}
}