From: Akhil Goyal <akhil.goyal@nxp.com>
To: dev@dpdk.org, hemant.agrawal@nxp.com
Cc: Akhil Goyal <akhil.goyal@nxp.com>
Subject: [dpdk-dev] [PATCH 2/4] crypto/dpaa2_sec: fix HFN override
Date: Tue, 7 Jul 2020 00:04:58 +0530 [thread overview]
Message-ID: <20200706183500.29862-2-akhil.goyal@nxp.com> (raw)
In-Reply-To: <20200706183500.29862-1-akhil.goyal@nxp.com>
HFN is set as a uint32_t but the value retrieved is
uint8_t. Fixed the type casting to get the correct value.
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index c56fb2152..109e61ae1 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
- * Copyright 2016-2019 NXP
+ * Copyright 2016-2020 NXP
*
*/
@@ -164,7 +164,8 @@ build_proto_compound_sg_fd(dpaa2_sec_session *sess,
* mbuf priv after sym_op.
*/
if (sess->ctxt_type == DPAA2_SEC_PDCP && sess->pdcp.hfn_ovd) {
- uint32_t hfn_ovd = *((uint8_t *)op + sess->pdcp.hfn_ovd_offset);
+ uint32_t hfn_ovd = *(uint32_t *)((uint8_t *)op +
+ sess->pdcp.hfn_ovd_offset);
/*enable HFN override override */
DPAA2_SET_FLE_INTERNAL_JD(ip_fle, hfn_ovd);
DPAA2_SET_FLE_INTERNAL_JD(op_fle, hfn_ovd);
@@ -239,7 +240,8 @@ build_proto_compound_fd(dpaa2_sec_session *sess,
* mbuf priv after sym_op.
*/
if (sess->ctxt_type == DPAA2_SEC_PDCP && sess->pdcp.hfn_ovd) {
- uint32_t hfn_ovd = *((uint8_t *)op + sess->pdcp.hfn_ovd_offset);
+ uint32_t hfn_ovd = *(uint32_t *)((uint8_t *)op +
+ sess->pdcp.hfn_ovd_offset);
/*enable HFN override override */
DPAA2_SET_FLE_INTERNAL_JD(ip_fle, hfn_ovd);
DPAA2_SET_FLE_INTERNAL_JD(op_fle, hfn_ovd);
--
2.17.1
next prev parent reply other threads:[~2020-07-06 18:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-06 18:34 [dpdk-dev] [PATCH 1/4] crypto/dpaax_sec: fix inline query for descriptors Akhil Goyal
2020-07-06 18:34 ` Akhil Goyal [this message]
2020-07-07 22:34 ` [dpdk-dev] [PATCH 2/4] crypto/dpaa2_sec: fix HFN override Akhil Goyal
2020-07-06 18:34 ` [dpdk-dev] [PATCH 3/4] common/dpaax/caamflib: fix 12 bit NULL auth case Akhil Goyal
2020-07-07 22:35 ` Akhil Goyal
2020-07-06 18:35 ` [dpdk-dev] [PATCH 4/4] common/dpaax/caamflib: remove unnecessary jump for few PDCP cases Akhil Goyal
2020-07-07 3:48 ` [dpdk-dev] [PATCH 1/4] crypto/dpaax_sec: fix inline query for descriptors Hemant Agrawal (OSS)
2020-07-07 22:32 ` 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=20200706183500.29862-2-akhil.goyal@nxp.com \
--to=akhil.goyal@nxp.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.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).