From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 93FC7A0579 for ; Wed, 14 Apr 2021 10:51:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8281916185D; Wed, 14 Apr 2021 10:51:19 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 3AD2E16184E; Wed, 14 Apr 2021 10:51:16 +0200 (CEST) IronPort-SDR: upcIPy+m+R6+NiN08N7od2FP/5Erm6Jx+2ADj0nmxUv544A9/KPPOHU2S7yJy72gvqydq/17o4 XM+p3eqjTMWg== X-IronPort-AV: E=McAfee;i="6200,9189,9953"; a="192473002" X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="192473002" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2021 01:51:15 -0700 IronPort-SDR: 60NC4SNUiXFcLC3vD6tk3dDURqs/wLQHmeUD8ICfYc+97DgKipRsGwKYH6cwoNxQgpimcCSJn0 evrP0Am0w8bw== X-IronPort-AV: E=Sophos;i="5.82,221,1613462400"; d="scan'208";a="424638187" Received: from dwdohert-mobl1.ger.corp.intel.com (HELO [10.213.234.180]) ([10.213.234.180]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2021 01:51:13 -0700 To: Arek Kusztal , dev@dpdk.org Cc: gakhil@marvell.com, fiona.trahe@intel.com, stable@dpdk.org References: <20210318131617.24660-1-arkadiuszx.kusztal@intel.com> From: "Doherty, Declan" Message-ID: <4705db37-2c89-b68a-d36f-e14a3216dfd9@intel.com> Date: Wed, 14 Apr 2021 09:51:09 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <20210318131617.24660-1-arkadiuszx.kusztal@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH] crypto/qat: fix to small sgl oop min offset X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 18/03/2021 1:16 PM, Arek Kusztal wrote: > This commit fixes problem with to small offset when both offsets > (auth, cipher) are non zero in digest encrypt case, > when using out-of-place and sgl. > > Fixes: 40002f6c2a24 ("crypto/qat: extend support for digest-encrypted auth-cipher") > Cc: stable@dpdk.org > > Signed-off-by: Arek Kusztal > --- > drivers/crypto/qat/qat_sym.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c > index 4b7676deb..a6cd33be3 100644 > --- a/drivers/crypto/qat/qat_sym.c > +++ b/drivers/crypto/qat/qat_sym.c > @@ -162,6 +162,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, > uint8_t do_sgl = 0; > uint8_t in_place = 1; > int alignment_adjustment = 0; > + int oop_shift = 0; > struct rte_crypto_op *op = (struct rte_crypto_op *)in_op; > struct qat_sym_op_cookie *cookie = > (struct qat_sym_op_cookie *)op_cookie; > @@ -472,6 +473,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, > rte_pktmbuf_iova_offset(op->sym->m_src, min_ofs); > dst_buf_start = > rte_pktmbuf_iova_offset(op->sym->m_dst, min_ofs); > + oop_shift = min_ofs; > > } else { > /* In-place operation > @@ -532,7 +534,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, > /* First find the end of the data */ > if (do_sgl) { > uint32_t remaining_off = auth_param->auth_off + > - auth_param->auth_len + alignment_adjustment; > + auth_param->auth_len + alignment_adjustment + oop_shift; > struct rte_mbuf *sgl_buf = > (in_place ? > op->sym->m_src : op->sym->m_dst); > Acked-by: Declan Doherty