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 B25C2A0548; Mon, 10 May 2021 12:20:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 922D340140; Mon, 10 May 2021 12:20:21 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id EFD2F4003E for ; Mon, 10 May 2021 12:20:19 +0200 (CEST) IronPort-SDR: rEzt2bOgeDaFOCnQBfTjVu/qrKTb/5upkIsIdNPeudcW8ogQKC8D+qdgP6O9oyp8ssU2+6zBpx 69oSVOgrLYdQ== X-IronPort-AV: E=McAfee;i="6200,9189,9979"; a="260426801" X-IronPort-AV: E=Sophos;i="5.82,286,1613462400"; d="scan'208";a="260426801" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 03:20:17 -0700 IronPort-SDR: ydiQxCywuIqMZFBwUZjjhnpPMlhbqFXRJ2eNAKms9YvBaHSfW+X1TWS9fqXr8T3pRXcztAAQ5u PFq2A3b/va9g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="468061108" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by fmsmga002.fm.intel.com with ESMTP; 10 May 2021 03:20:15 -0700 From: Adam Dybkowski To: dev@dpdk.org, roy.fan.zhang@intel.com, arkadiuszx.kusztal@intel.com, gakhil@marvell.com Cc: Adam Dybkowski Date: Mon, 10 May 2021 11:20:11 +0100 Message-Id: <20210510102011.44343-1-adamx.dybkowski@intel.com> X-Mailer: git-send-email 2.13.6 Subject: [dpdk-dev] [PATCH] crypto/qat: fix NULL authentication request 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 Sender: "dev" 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") 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