From patchwork Fri Mar 15 05:42:12 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: 138419 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 6467E43CA6; Fri, 15 Mar 2024 06:43:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1063342EE5; Fri, 15 Mar 2024 06:43:18 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 49E46410FC for ; Fri, 15 Mar 2024 06:42: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 42F0aS25018658 for ; Thu, 14 Mar 2024 22:42:35 -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=Em5DnOLvXu8ha4dwGbEBJh4ut/jTijn2y0zmLNq4iOI=; b=OSs en4Dqp/4y5mc9u/cboxS6LMSBjOWi6GMiWUdzQ3MHyEgFrttnb02MvU+f9U7Qmk2 eTulrvF7pAZLSGnpbfYotuPz8dXe6FGiiYD5DoYX6+E9/sYoahnZhO+Bw7pr73XX X9av2WnkHN7lDhw5P3qt3yLJ0ZaL62zTOxsJ3vGcHZXVMpBQxM9ecpasv7fMUqSK 0xbH8kRTkY1fCUDQ5OFOzFM6vJ9QjcQujU0kviDbNwpwrlpTVdb+wIBnJI798iA5 gBmF+cWE7ydn5E1T7tlhf2/c4MVqgze25cNLPpnCtnRwIkOWTk5ILS+S3mY3nL51 h0qffQIMWR1zUMiBD2Q== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3wvbxbrpga-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Mar 2024 22:42:35 -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 22:42: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 22:42:34 -0700 Received: from BG-LT92004.corp.innovium.com (unknown [10.193.69.194]) by maili.marvell.com (Postfix) with ESMTP id B19C93F703F; Thu, 14 Mar 2024 22:42:32 -0700 (PDT) From: Vidya Sagar Velumuri To: Akhil Goyal CC: Aakash Sasidharan , Jerin Jacob , , Anoob Joseph Subject: [PATCH v3 7/8] crypto/cnxk: add support for oop processing in TLS Date: Fri, 15 Mar 2024 11:12:12 +0530 Message-ID: <20240315054213.540-8-vvelumuri@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240315054213.540-1-vvelumuri@marvell.com> References: <20240314131839.3362494-1-vvelumuri@marvell.com> <20240315054213.540-1-vvelumuri@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: qbFGY_QTUJ_b_cv3KG2MLloFFP_dMFhG X-Proofpoint-ORIG-GUID: qbFGY_QTUJ_b_cv3KG2MLloFFP_dMFhG 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_13,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 From: Aakash Sasidharan Add support for out-of-place processing in TLS. Signed-off-by: Aakash Sasidharan --- drivers/crypto/cnxk/cn10k_tls_ops.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/cnxk/cn10k_tls_ops.h b/drivers/crypto/cnxk/cn10k_tls_ops.h index 64f94a4e8b..e8e2547f68 100644 --- a/drivers/crypto/cnxk/cn10k_tls_ops.h +++ b/drivers/crypto/cnxk/cn10k_tls_ops.h @@ -27,6 +27,7 @@ process_tls_write(struct roc_cpt_lf *lf, struct rte_crypto_op *cop, struct cn10k struct roc_ie_ot_tls_write_sa *write_sa; #endif struct rte_mbuf *m_src = sym_op->m_src; + struct rte_mbuf *m_dst = sym_op->m_dst; uint32_t pad_len, pad_bytes; struct rte_mbuf *last_seg; union cpt_inst_w4 w4; @@ -191,7 +192,9 @@ process_tls_write(struct roc_cpt_lf *lf, struct rte_crypto_op *cop, struct cn10k i = 0; scatter_comp = (struct roc_sg2list_comp *)((uint8_t *)gather_comp + g_size_bytes); - i = fill_sg2_comp_from_pkt(scatter_comp, i, m_src); + if (m_dst == NULL) + m_dst = m_src; + i = fill_sg2_comp_from_pkt(scatter_comp, i, m_dst); cpt_inst_w6.s.scatter_sz = ((i + 2) / 3); @@ -221,6 +224,7 @@ process_tls_read(struct rte_crypto_op *cop, struct cn10k_sec_session *sess, { struct rte_crypto_sym_op *sym_op = cop->sym; struct rte_mbuf *m_src = sym_op->m_src; + struct rte_mbuf *m_dst = sym_op->m_dst; union cpt_inst_w4 w4; uint8_t *in_buffer; void *m_data; @@ -334,7 +338,9 @@ process_tls_read(struct rte_crypto_op *cop, struct cn10k_sec_session *sess, i = 0; scatter_comp = (struct roc_sg2list_comp *)((uint8_t *)gather_comp + g_size_bytes); - i = fill_sg2_comp_from_pkt(scatter_comp, i, m_src); + if (m_dst == NULL) + m_dst = m_src; + i = fill_sg2_comp_from_pkt(scatter_comp, i, m_dst); cpt_inst_w6.s.scatter_sz = ((i + 2) / 3);