[10/12] crypto/cnxk: use proper offset for context calculation
Checks
Commit Message
Use the proper offset for calculating the context size in case of TLS-1.3.
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
---
drivers/crypto/cnxk/cn10k_tls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -309,7 +309,7 @@ tls_read_ctx_size(struct roc_ie_ot_tls_read_sa *sa, enum rte_security_tls_versio
/* Variable based on Anti-replay Window */
if (tls_ver == RTE_SECURITY_VERSION_TLS_1_3) {
size = offsetof(struct roc_ie_ot_tls_read_sa, tls_13.ctx) +
- offsetof(struct roc_ie_ot_tls_read_ctx_update_reg, ar_winbits);
+ sizeof(struct roc_ie_ot_tls_1_3_read_ctx_update_reg);
} else {
size = offsetof(struct roc_ie_ot_tls_read_sa, tls_12.ctx) +
offsetof(struct roc_ie_ot_tls_read_ctx_update_reg, ar_winbits);