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 9F139A0A02 for ; Thu, 13 May 2021 13:10:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 700C34003F; Thu, 13 May 2021 13:10:02 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 62CC64003F for ; Thu, 13 May 2021 13:10:00 +0200 (CEST) IronPort-SDR: SBstY4PleC9k4YDXA94M7kXU1pi6bw5VINmBDlO2An/KlwiGVj4aZrlRgXEs1JzGEeimKK/s7Q kBSPyDAqMA7Q== X-IronPort-AV: E=McAfee;i="6200,9189,9982"; a="285425346" X-IronPort-AV: E=Sophos;i="5.82,296,1613462400"; d="scan'208";a="285425346" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2021 04:09:58 -0700 IronPort-SDR: EuvmTgQOpxRe6RDmZbFoLhzF+qV2KSiw93nGK8gqL02fIXmixSCQ4ahL2FDh7NYKYiGLK7XnEL ERXthxYWjF8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,296,1613462400"; d="scan'208";a="463247107" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by FMSMGA003.fm.intel.com with ESMTP; 13 May 2021 04:09:57 -0700 From: Adam Dybkowski To: stable@dpdk.org, roy.fan.zhang@intel.com, bernard.iremonger@intel.com Cc: Adam Dybkowski Date: Thu, 13 May 2021 12:10:16 +0100 Message-Id: <20210513111016.28677-1-adamx.dybkowski@intel.com> X-Mailer: git-send-email 2.13.6 Subject: [dpdk-stable] [PATCH] crypto/qat: fix NULL authentication request 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" This patch fixes the NULL auth generation case where the request shouldn't contain the authentication result address. Allows to run ipsec_autotest with a QAT device. Fixes: 65beb9abca6d ("crypto/qat: fix null auth when using VFIO") Cc: stable@dpdk.org Signed-off-by: Adam Dybkowski --- drivers/crypto/qat/qat_sym.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c index a1f5676c04..9415ec7d32 100644 --- a/drivers/crypto/qat/qat_sym.c +++ b/drivers/crypto/qat/qat_sym.c @@ -399,8 +399,10 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, } min_ofs = auth_ofs; - auth_param->auth_res_addr = - op->sym->auth.digest.phys_addr; + if (ctx->qat_hash_alg != ICP_QAT_HW_AUTH_ALGO_NULL || + ctx->auth_op == ICP_QAT_HW_AUTH_VERIFY) + auth_param->auth_res_addr = + op->sym->auth.digest.phys_addr; } -- 2.25.1