From patchwork Mon Aug 8 08:05:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 114700 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 31677A034C; Mon, 8 Aug 2022 10:07:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18D2042C62; Mon, 8 Aug 2022 10:06:36 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id BA9E842C60 for ; Mon, 8 Aug 2022 10:06:34 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 277N0Na6005832 for ; Mon, 8 Aug 2022 01:06:34 -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=S4G5kQUCvZ5krs7SNbFROGTF1EMti7nXQCx79tJdGpQ=; b=VR7I9vdJRC1+3dUp0g0fFzIdj1BGBPiQKdE6wqYQZxH0zbmJKfh/W5NegP/f3sXM1+uC k7k9IqfCxO00/+SWWbvA1lwZucFyxyXiFDKXX3r7czlrLPg2MxdKvSMcz3qBwFn8y9Ny 7Rcip7RRCJS2EVQAwDaP1jVFB1Zxnkxb3zCFXfz3TOzP6Vs9LgGQdLDG8Knif4D83qS5 6fW+OJYsYmhLzJz+FWRkXgj49N3Irh018oebMk4oOGjminggkbUElAw/BcInxj5sPC4l QrzJp6qtCLhAHiQcj09iKfKTolOzP1O1V59H/j62OOUnMhn035b4G/yrE7klShd4THlO zQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3hsqtmmxen-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 08 Aug 2022 01:06:34 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 8 Aug 2022 01:06:32 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 8 Aug 2022 01:06:32 -0700 Received: from BG-LT92004.corp.innovium.com (unknown [10.28.160.62]) by maili.marvell.com (Postfix) with ESMTP id 364E93F7051; Mon, 8 Aug 2022 01:06:29 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal , Jerin Jacob CC: Archana Muniganti , Tejasree Kondoj , Subject: [PATCH 10/18] crypto/cnxk: remove extra digest len check Date: Mon, 8 Aug 2022 13:35:58 +0530 Message-ID: <20220808080606.220-11-anoobj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220808080606.220-1-anoobj@marvell.com> References: <20220808080606.220-1-anoobj@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: 0150mSKN5DnwqNEFTX0KCWpI1I__bGAx X-Proofpoint-ORIG-GUID: 0150mSKN5DnwqNEFTX0KCWpI1I__bGAx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-08_05,2022-08-05_01,2022-06-22_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 When the flag ROC_SE_VALID_MAC_BUF is set, digest length will be non-zero. Remove extra check in datapath. Signed-off-by: Anoob Joseph --- drivers/crypto/cnxk/cnxk_se.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h index c176cda0b1..64a66ef911 100644 --- a/drivers/crypto/cnxk/cnxk_se.h +++ b/drivers/crypto/cnxk/cnxk_se.h @@ -680,11 +680,9 @@ cpt_enc_hmac_prep(uint32_t flags, uint64_t d_offs, uint64_t d_lens, return -1; } } - /* mac_data */ - if (mac_len) { - i = fill_sg_comp_from_buf(scatter_comp, i, - &fc_params->mac_buf); - } + + /* Digest buffer */ + i = fill_sg_comp_from_buf(scatter_comp, i, &fc_params->mac_buf); } else { /* Output including mac */ size = outputlen - iv_len;