From patchwork Sun May 1 19:24:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 110553 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 B79D9A0093; Sun, 1 May 2022 21:25:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C9CDA4282E; Sun, 1 May 2022 21:25:25 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id DCD6C4282D for ; Sun, 1 May 2022 21:25:24 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.16.1.2) with ESMTP id 241J9YAm012968; Sun, 1 May 2022 12:25:24 -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=8AmeqhPiWYa7LQLNfeOuky38fJt0sLuy+nfdGDLwu74=; b=VPAzfwwU9/sn3R57l3Su2E+6rcawJLmomBU4SV1L1F4U4z6xUY3fRCoTfMxCIxQM/YN/ UYYiKsTAmMmfEk8VCiKvv1pdMuMEZ9KFtYXPu66VTugx/eWWRxSdX/b0tMzk19rPUHwW 7uA+OLskWumPWlOdaXAxK0eKv7yjivClF7hyhyUpSAuWKs/nEszDaWAONuu54TnUp8lf F2B5R1OlLjZSjhJf31EMgt+4Rjxcx6bNNGGmj9ybDAIukiKn/oGSvb57XQo9wVFxYxQq JMcODtqxkQ8n1ez+2kX4Cz4dZbPfWMDQJAyN4jrtSsIox1B44fc/flWB7wTl1ozPV7sn RQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3fs2fmugy4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 01 May 2022 12:25:23 -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; Sun, 1 May 2022 12:25:22 -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; Sun, 1 May 2022 12:25:22 -0700 Received: from localhost.localdomain (unknown [10.28.48.55]) by maili.marvell.com (Postfix) with ESMTP id 70ABB3F7090; Sun, 1 May 2022 12:25:19 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , Akhil Goyal , Fan Zhang , Abhinandan Gujjar Subject: [PATCH v4 3/7] crypto/octeontx: use new API for event metadata Date: Mon, 2 May 2022 00:54:53 +0530 Message-ID: <20220501192457.3670278-4-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220501192457.3670278-1-gakhil@marvell.com> References: <20220421143720.1583062-1-gakhil@marvell.com> <20220501192457.3670278-1-gakhil@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: _4Ra_fCAqSs8fETELrn-gQ6Pkl-IjCWu X-Proofpoint-ORIG-GUID: _4Ra_fCAqSs8fETELrn-gQ6Pkl-IjCWu 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-05-01_07,2022-04-28_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;