From patchwork Thu Jul 13 12:34:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arkadiusz Kusztal X-Patchwork-Id: 26890 X-Patchwork-Delegate: pablo.de.lara.guarch@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id B16B12BBE; Thu, 13 Jul 2017 14:35:18 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 25FE829CB for ; Thu, 13 Jul 2017 14:35:16 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jul 2017 05:35:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.40,354,1496127600"; d="scan'208"; a="1172098602" Received: from sivswdev03.ir.intel.com (HELO localhost.localdomain) ([10.237.217.157]) by fmsmga001.fm.intel.com with ESMTP; 13 Jul 2017 05:35:00 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: fiona.trahe@intel.com, pablo.de.lara.guarch@intel.com, john.griffin@intel.com, deepak.k.jain@intel.com, Arek Kusztal Date: Thu, 13 Jul 2017 13:34:57 +0100 Message-Id: <1499949297-16709-1-git-send-email-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] crypto/qat: fix authentication offset and length for GMAC X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Authentication length and offset need to be set like for any other authentication algorithms as it no longer uses aad pointer Fixes: b79e4c00af0e ("cryptodev: use AES-GCM/CCM as AEAD algorithms") Signed-off-by: Arek Kusztal Acked-by: Fiona Trahe --- drivers/crypto/qat/qat_crypto.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c index 7e04f21..274315c 100644 --- a/drivers/crypto/qat/qat_crypto.c +++ b/drivers/crypto/qat/qat_crypto.c @@ -1218,6 +1218,8 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg, set_cipher_iv(ctx->auth_iv.length, ctx->auth_iv.offset, cipher_param, op, qat_req); + auth_ofs = op->sym->auth.data.offset; + auth_len = op->sym->auth.data.length; } else { auth_ofs = op->sym->auth.data.offset; auth_len = op->sym->auth.data.length; @@ -1361,12 +1363,7 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg, } /* GMAC */ if (!do_aead) { - qat_req->comn_mid.dst_length = - qat_req->comn_mid.src_length = - rte_pktmbuf_data_len(op->sym->m_src); 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->u2.aad_sz = 0; } }