DPDK patches and discussions
 help / color / mirror / Atom feed
From: Brian Dooley <brian.dooley@intel.com>
To: Kai Ji <kai.ji@intel.com>
Cc: dev@dpdk.org, gakhil@marvell.com, Brian Dooley <brian.dooley@intel.com>
Subject: [PATCH v1] crypto/qat: fix struct alignment
Date: Fri, 30 Jun 2023 11:30:40 +0000	[thread overview]
Message-ID: <20230630113040.521683-1-brian.dooley@intel.com> (raw)

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 <brian.dooley@intel.com>
---
 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
-- 
2.25.1


             reply	other threads:[~2023-06-30 11:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 11:30 Brian Dooley [this message]
2023-06-30 21:19 ` Power, Ciara
2023-07-03 14:15   ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230630113040.521683-1-brian.dooley@intel.com \
    --to=brian.dooley@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=kai.ji@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).