[v2,01/13] common/dpaax: update IPsec base descriptor length
Checks
Commit Message
From: Gagandeep Singh <g.singh@nxp.com>
If all the keys are inlined, the descriptor would
be 32 + 20 = 52 which is the size of the CURRENT shared
descriptor created.
So 32 * CAAM_CMD_SZ is the value that must be passed to
rta_inline_query() for its "sd_base_len" parameter and
drivers are using IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN
value to pass as first argument to rta_inline_query().
So, Value of IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN must be
updated to 32 CAAM_CMD_SZ.
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/common/dpaax/caamflib/desc/ipsec.h | 4 ++--
drivers/common/dpaax/caamflib/rta/sec_run_time_asm.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
*
* Copyright 2008-2016 Freescale Semiconductor Inc.
- * Copyright 2016,2019-2020 NXP
+ * Copyright 2016,2019-2022 NXP
*
*/
@@ -1380,7 +1380,7 @@ cnstr_shdsc_ipsec_new_decap(uint32_t *descbuf, bool ps,
* layers to determine whether keys can be inlined or not. To be used as first
* parameter of rta_inline_query().
*/
-#define IPSEC_AUTH_VAR_BASE_DESC_LEN (27 * CAAM_CMD_SZ)
+#define IPSEC_AUTH_VAR_BASE_DESC_LEN (31 * CAAM_CMD_SZ)
/**
* IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN - IPsec AES decap shared descriptor
@@ -413,7 +413,7 @@ rta_program_finalize(struct program *program)
{
/* Descriptor is usually not allowed to go beyond 64 words size */
if (program->current_pc > MAX_CAAM_DESCSIZE)
- pr_warn("Descriptor Size exceeded max limit of 64 words\n");
+ pr_debug("Descriptor Size exceeded max limit of 64 words");
/* Descriptor is erroneous */
if (program->first_error_pc) {