From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C693FA00E6 for ; Fri, 9 Aug 2019 11:30:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DFC202082; Fri, 9 Aug 2019 11:30:38 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 839993DC for ; Fri, 9 Aug 2019 11:30:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Aug 2019 02:30:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,364,1559545200"; d="scan'208";a="193356574" Received: from damiannx-mobl1.ger.corp.intel.com ([10.103.104.103]) by fmsmga001.fm.intel.com with ESMTP; 09 Aug 2019 02:30:23 -0700 From: Damian Nowak To: dev@dpdk.org Cc: akhil.goyal@nxp.com, fiona.trahe@intel.com, arkadiuszx.kusztal@intel.com, Damian Nowak Date: Fri, 9 Aug 2019 11:29:01 +0200 Message-Id: <20190809092901.17788-1-damianx.nowak@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] crypto/qat: fix null auth issues when using vfio_pci 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" When running auth NULL cases while using vfio_pci, DMAR read/write faults appear. It happens even if digest_length is set to 0. This is caused by auth_res_addr initialized as 0x0. Fixes: 4e0955bddb08 Cc: Fiona Trahe Signed-off-by: Damian Nowak --- drivers/crypto/qat/qat_sym.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c index 46ef27a..6aa514c 100644 --- a/drivers/crypto/qat/qat_sym.c +++ b/drivers/crypto/qat/qat_sym.c @@ -307,9 +307,8 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, } min_ofs = auth_ofs; - if (likely(ctx->qat_hash_alg != ICP_QAT_HW_AUTH_ALGO_NULL)) - auth_param->auth_res_addr = - op->sym->auth.digest.phys_addr; + auth_param->auth_res_addr = + op->sym->auth.digest.phys_addr; } -- 2.7.4