From patchwork Thu Apr 21 14:37:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 110001 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 2D913A0093; Thu, 21 Apr 2022 16:37:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C422D410FB; Thu, 21 Apr 2022 16:37:43 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id B26B9427F8 for ; Thu, 21 Apr 2022 16:37:41 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 23LD0GBI027249; Thu, 21 Apr 2022 07:37:41 -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=tcmjqLOQ/COhZYVgmZdU1zfCyoAye/tUk88CHicEsfE=; b=Yw1ZSCbVzmbF8BLmb/dp2anq4tSblG5yuUxS253gpFfI7jrBj0IqWUCReFT5GOFX9Wn/ TU4u09T1sVseSsv7gwV1gnGowpLZiabGrC6JoLD0ZsZsSqC3JqG/NNKKkHe4buNt6tto 84F1DJUHO1XJ/7JvtXWg9BuDSKb055IEKNTQepUkkqEGC/yipApASZwlDeCdBWlliyZM ERnJIkmMBHapCcDOSIrQVTQOKy6e48iYERAn8q4PJjXu3aN7HQgIwFz6+8cnHGyoUF8z EBV7deXmvooNwhqXJ7Q81tymSX8vP3iKIHpog83p1Ai6kwUX9a7vAa+vsFY2pHKccfXv cA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3fhtapjcaf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 21 Apr 2022 07:37:41 -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; Thu, 21 Apr 2022 07:37:39 -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; Thu, 21 Apr 2022 07:37:39 -0700 Received: from localhost.localdomain (unknown [10.28.48.55]) by maili.marvell.com (Postfix) with ESMTP id 9237B3F7059; Thu, 21 Apr 2022 07:37:36 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , Akhil Goyal Subject: [PATCH v3 3/7] crypto/octeontx: use new API for event metadata Date: Thu, 21 Apr 2022 20:07:16 +0530 Message-ID: <20220421143720.1583062-4-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220421143720.1583062-1-gakhil@marvell.com> References: <20220418193325.368313-1-gakhil@marvell.com> <20220421143720.1583062-1-gakhil@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: aw0MwVzXIOu_UE1gTJl5mey0dHSkksDJ X-Proofpoint-ORIG-GUID: aw0MwVzXIOu_UE1gTJl5mey0dHSkksDJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-21_01,2022-04-21_01,2022-02-23_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 For getting event crypto metadata from crypto_op, the new API rte_cryptodev_get_session_event_mdata can be used directly instead of getting userdata inside PMD. Signed-off-by: Akhil Goyal Acked-by: Fan Zhang Acked-by: Abhinandan Gujjar --- drivers/crypto/octeontx/otx_cryptodev_ops.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c index ddb1266c3c..d5851d9987 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_ops.c +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c @@ -684,24 +684,6 @@ submit_request_to_sso(struct ssows *ws, uintptr_t req, ssovf_store_pair(add_work, req, ws->grps[rsp_info->queue_id]); } -static inline union rte_event_crypto_metadata * -get_event_crypto_mdata(struct rte_crypto_op *op) -{ - union rte_event_crypto_metadata *ec_mdata; - - if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) - ec_mdata = rte_cryptodev_sym_session_get_user_data( - op->sym->session); - else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS && - op->private_data_offset) - ec_mdata = (union rte_event_crypto_metadata *) - ((uint8_t *)op + op->private_data_offset); - else - return NULL; - - return ec_mdata; -} - uint16_t __rte_hot otx_crypto_adapter_enqueue(void *port, struct rte_crypto_op *op) { @@ -712,7 +694,7 @@ otx_crypto_adapter_enqueue(void *port, struct rte_crypto_op *op) uint8_t op_type, cdev_id; uint16_t qp_id; - ec_mdata = get_event_crypto_mdata(op); + ec_mdata = rte_cryptodev_session_event_mdata_get(op); if (unlikely(ec_mdata == NULL)) { rte_errno = EINVAL; return 0;