From patchwork Fri Jan 21 10:38:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ji, Kai" X-Patchwork-Id: 106177 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 72724A034E; Fri, 21 Jan 2022 11:38:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3C4442747; Fri, 21 Jan 2022 11:38:36 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 2C53440042; Fri, 21 Jan 2022 11:38:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642761515; x=1674297515; h=from:to:cc:subject:date:message-id; bh=7CMDvRhROox+lZJv8+c5218GQ3i7fq+yD/KfNfQ0/iw=; b=c9aQ+g7f3vTFe39A1HJLFSsRdCFthSILNhMJGOMTk8nkidrOTdDxg3GS NfeE2DUQdxQDrQsS6lUL0yLcXU+LXjnRS9UT9bXyquZcYkV1cTAP4ozOC RV2Q7GcZLhJIAcU0yvSyjzPmPaeKtoyhN9tnYLN+J6ct74gbmioKU/AY/ sa3m5YH5mNtGLlYdl9ImMLA0avsEElncluePjgwltQVxDDo3ppDoT2LI4 ah++Adg2YQhDkxcV32lIXTUAJixNGrKJhtMM0T1b3Xei6xQZDJQwP9ezl 3gB0lsoOgEHKK5MmrhsBWYxJYgtTblTn5il1jp9Y4wIyIczE0Xkj6zyIQ A==; X-IronPort-AV: E=McAfee;i="6200,9189,10233"; a="243221441" X-IronPort-AV: E=Sophos;i="5.88,304,1635231600"; d="scan'208";a="243221441" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2022 02:38:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,304,1635231600"; d="scan'208";a="519027054" Received: from silpixa00400272.ir.intel.com (HELO silpixa00400272.ger.corp.intel.com) ([10.237.223.111]) by orsmga007.jf.intel.com with ESMTP; 21 Jan 2022 02:38:32 -0800 From: Kai Ji To: dev@dpdk.org Cc: stable@dpdk.org, Kai Ji , roy.fan.zhang@intel.com Subject: [dpdk-dev v1] crypto/qat: fix QAT GEN4 AEAD job in raw data path Date: Fri, 21 Jan 2022 10:38:30 +0000 Message-Id: <20220121103830.14058-1-kai.ji@intel.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patch fix the cipher params configuration in AEAD job if QAT GEN4 unified cipher slice(UCS) enabled. Fixes: 328d690d2f60 ("crypto/qat: update raw data path") Cc: roy.fan.zhang@intel.com Signed-off-by: Kai Ji Acked-by: Fan Zhang --- drivers/crypto/qat/qat_sym_hw_dp.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/qat/qat_sym_hw_dp.c b/drivers/crypto/qat/qat_sym_hw_dp.c index 12825e448b..792ad2b213 100644 --- a/drivers/crypto/qat/qat_sym_hw_dp.c +++ b/drivers/crypto/qat/qat_sym_hw_dp.c @@ -533,8 +533,20 @@ enqueue_one_aead_job(struct qat_sym_session *ctx, /* CPM 1.7 uses single pass to treat AEAD as cipher operation */ if (ctx->is_single_pass) { enqueue_one_cipher_job(ctx, req, iv, ofs, data_len); - cipher_param->spc_aad_addr = aad->iova; - cipher_param->spc_auth_res_addr = digest->iova; + + if (ctx->is_ucs) { + /* QAT GEN4 uses single pass to treat AEAD as cipher + * operation + */ + struct icp_qat_fw_la_cipher_20_req_params *cipher_param_20 = + (void *)&req->serv_specif_rqpars; + cipher_param_20->spc_aad_addr = aad->iova; + cipher_param_20->spc_auth_res_addr = digest->iova; + } else { + cipher_param->spc_aad_addr = aad->iova; + cipher_param->spc_auth_res_addr = digest->iova; + } + return; }