From patchwork Fri Jun 30 11:30:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dooley, Brian" X-Patchwork-Id: 129161 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 9822942D94; Fri, 30 Jun 2023 13:30:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20F41406B6; Fri, 30 Jun 2023 13:30:48 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 1E697406B5 for ; Fri, 30 Jun 2023 13:30:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688124646; x=1719660646; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8YSRzi+rVNTx6z0xUW8+7ahHbTcH1tU04G3/NVE/tJI=; b=mplm+F/ei4JQVGNCV1ZQD2a5CSh2gAZYDRzQ87cYJuBo8OX188XNa4N9 JVGF7QV1ca+JQEbt2fseLt34c90zZuTRfOB1OcGaE+5x8pOSk9793qFqV QVP4BAovYkkJXWTlJ6unsbHJZfqYWQW5s6uisy4kolog3wd/cDJjTCTKL sc4aaU8t6WViofBxmkvTaY5kMPIyM6A6yev3uOjX3tNAYW7m3EJ8BUwPf s6ud6psxl8SqlZ/ShWJgsgw+83WjE2CugEn35M/NUWDbgu79NFHxV3mGt 0jvMiroTIwCFO9zRYJOFwfNJueSJ5sHavitiKO7BU//RBX6DYP1IrAqyh A==; X-IronPort-AV: E=McAfee;i="6600,9927,10756"; a="362415409" X-IronPort-AV: E=Sophos;i="6.01,170,1684825200"; d="scan'208";a="362415409" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2023 04:30:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10756"; a="694987210" X-IronPort-AV: E=Sophos;i="6.01,170,1684825200"; d="scan'208";a="694987210" Received: from silpixa00400883.ir.intel.com ([10.243.22.155]) by orsmga006.jf.intel.com with ESMTP; 30 Jun 2023 04:30:43 -0700 From: Brian Dooley To: Kai Ji Cc: dev@dpdk.org, gakhil@marvell.com, Brian Dooley Subject: [PATCH v1] crypto/qat: fix struct alignment Date: Fri, 30 Jun 2023 11:30:40 +0000 Message-Id: <20230630113040.521683-1-brian.dooley@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 The qat_sym_session struct variable alignment was causing a segfault. AES expansion keys require 16-byte alignment. Added __rte_aligned to the expansion keys. Fixes: ca0ba0e48129 ("crypto/qat: default to IPsec MB for computations") Signed-off-by: Brian Dooley Acked-by: Ciara Power --- drivers/crypto/qat/qat_sym_session.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qat/qat_sym_session.h b/drivers/crypto/qat/qat_sym_session.h index 68cf3eaaf4..674a62ee12 100644 --- a/drivers/crypto/qat/qat_sym_session.h +++ b/drivers/crypto/qat/qat_sym_session.h @@ -142,10 +142,10 @@ struct qat_sym_session { qat_sym_build_request_t build_request[2]; #ifndef RTE_QAT_OPENSSL IMB_MGR *mb_mgr; -#endif - uint64_t expkey[4*15]; - uint32_t dust[4*15]; + uint64_t expkey[4*15] __rte_aligned(16); + uint32_t dust[4*15] __rte_aligned(16); uint8_t docsis_key_len; +#endif }; int