From patchwork Thu Mar 14 08:38:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vidya Sagar Velumuri X-Patchwork-Id: 138363 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 C96E343CAE; Thu, 14 Mar 2024 09:40:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0AD2A42E94; Thu, 14 Mar 2024 09:39:39 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 0778242E92 for ; Thu, 14 Mar 2024 09:39:36 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42DNJPLM016325 for ; Thu, 14 Mar 2024 01:39:36 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= pfpt0220; bh=05wsHjxsGyPMZcBJc9lLbr/iA1kcNv2pHdsps8W4daA=; b=HZe oOPU8jne5SMH2mJKyG1Mb/0y/wWyoxAtH9gFPgLhIlf5KAw24eAeHQWUuxjq2D7M ZhsEVl5apTfZoqls8Tcjw2jophQfuLkf1s0o9TYGKURWBi6lCqkEk0jjdixPkpPt K/r/xBqqDdqE0W0I7Y97NqjTfk3OKi+l/SG+uBOXW8fmCUpELj6NI2N9S+GqiBqz SMzZ2NqDE1tr/fY0SjgaDxnizPXBk5FB2oWetv+hsujnKtjfKNF8d8100LHtX0rP CK03Loi403ZCgD/9Riny24kvuZc0JW5y9i76CWYPZ02Ujp4FttLfzT8KC0VjZ9m3 2xwkDtoyz6ascj1gDnw== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3wucg2uww3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Mar 2024 01:39:36 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Thu, 14 Mar 2024 01:39:35 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1258.12 via Frontend Transport; Thu, 14 Mar 2024 01:39:35 -0700 Received: from localhost.localdomain (unknown [10.28.36.179]) by maili.marvell.com (Postfix) with ESMTP id DE20C3F7051; Thu, 14 Mar 2024 01:39:32 -0700 (PDT) From: Vidya Sagar Velumuri To: Ankur Dwivedi , Anoob Joseph , Tejasree Kondoj CC: , , , , Subject: [PATCH 10/12] crypto/cnxk: use proper offset for context calculation Date: Thu, 14 Mar 2024 01:38:42 -0700 Message-ID: <20240314083844.3319506-11-vvelumuri@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240314083844.3319506-1-vvelumuri@marvell.com> References: <20240314083844.3319506-1-vvelumuri@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: HwPDLskYpEGp4chgChmkrWDVvzMXDTiS X-Proofpoint-GUID: HwPDLskYpEGp4chgChmkrWDVvzMXDTiS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-14_07,2024-03-13_01,2023-05-22_02 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 Use the proper offset for calculating the context size in case of TLS-1.3. Signed-off-by: Vidya Sagar Velumuri --- drivers/crypto/cnxk/cn10k_tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/cnxk/cn10k_tls.c b/drivers/crypto/cnxk/cn10k_tls.c index fbf45c464a..4b558ef365 100644 --- a/drivers/crypto/cnxk/cn10k_tls.c +++ b/drivers/crypto/cnxk/cn10k_tls.c @@ -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);