From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1A11541D5F; Fri, 24 Feb 2023 10:40:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C75941153; Fri, 24 Feb 2023 10:40:31 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 087CE41141 for ; Fri, 24 Feb 2023 10:40:27 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31O6mfwQ031919 for ; Fri, 24 Feb 2023 01:40:27 -0800 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=LfSB+35B+sG5wJOT667l0P+hvDVgZUfW6U3/ASxX1Pc=; b=FRBck67+N27Zj1Jvmf/8liyml/VTHH/AQccwSl59Wo0QrlKM9dE+FtsnpdQmiKWurp9+ S1zVcXtvipGXydE84A3jU7Jvs7vKDA3OLdcln373CN8bcRklOPCfPaHzgPL6nbeaHAeJ H59wMfldbzFa69cYcGykijStxEtV7ueuZkFa41wTd1J3DaU/seuF0iT7O1+6TETUy9g7 EmP4pRc9zXf+oucwDU06sklMmCfJzkTOxGi+Nd88aRvngnIaJ99n/PJDPmAp+ZF6xnfb IQR6C2Zu7k3s9zPPG59sYmWX1V0VOf/hceFC49ZZ6rPQWngYQuWC4zc3l2+vzydrESK3 HA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3nxfkwb2gs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 24 Feb 2023 01:40:27 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 24 Feb 2023 01:40:24 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Fri, 24 Feb 2023 01:40:24 -0800 Received: from hyd1554.marvell.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id 4E2FF5B6929; Fri, 24 Feb 2023 01:40:23 -0800 (PST) From: Tejasree Kondoj To: Akhil Goyal CC: Anoob Joseph , Gowrishankar Muthukrishnan , Subject: [PATCH v2 04/11] crypto/cnxk: use direct mode for zero aad length Date: Fri, 24 Feb 2023 15:10:07 +0530 Message-ID: <20230224094014.3246764-5-ktejasree@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230224094014.3246764-1-ktejasree@marvell.com> References: <20230224094014.3246764-1-ktejasree@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: DxFmmJr_vcmeFMFNM862IoRLfrx1T6Ix X-Proofpoint-ORIG-GUID: DxFmmJr_vcmeFMFNM862IoRLfrx1T6Ix X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-24_05,2023-02-23_01,2023-02-09_01 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 Using direct mode if aad length is zero. Signed-off-by: Tejasree Kondoj --- drivers/crypto/cnxk/cnxk_se.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h index c16027ec75..69cd343eea 100644 --- a/drivers/crypto/cnxk/cnxk_se.h +++ b/drivers/crypto/cnxk/cnxk_se.h @@ -2258,9 +2258,9 @@ fill_fc_params(struct rte_crypto_op *cop, struct cnxk_se_sess *sess, aad_data = sym_op->aead.aad.data; aad_len = sess->aad_length; - if (likely((aad_data + aad_len) == - rte_pktmbuf_mtod_offset(m_src, uint8_t *, - sym_op->aead.data.offset))) { + if (likely((aad_len == 0) || + ((aad_data + aad_len) == + rte_pktmbuf_mtod_offset(m_src, uint8_t *, sym_op->aead.data.offset)))) { d_offs = (d_offs - aad_len) | (d_offs << 16); d_lens = (d_lens + aad_len) | (d_lens << 32); } else { -- 2.25.1