From patchwork Sun May 1 19:24:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 110554 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 844B4A0093; Sun, 1 May 2022 21:25:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C445042828; Sun, 1 May 2022 21:25:30 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 8D3EA42827 for ; Sun, 1 May 2022 21:25:28 +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 241IksxG014660; Sun, 1 May 2022 12:25:27 -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=Gww/iHbeXvio5Q7SnpSZsqbM6zgKmbZiuwLA9Zi/UlA=; b=UxDmGw41xsxdgUDuwhta33gOxOfLZGWNdK0hzR5VW6eqc6Bsxsw2d3hFUi5w5TgLwGkC VAhX+6NszdxT6hXHU79CZSWZlrMos2NkF2rRdvhUc/XuJevtsog7TysrN3xcTM7MWQ16 Gib411YaYnhDirRSarn5aWardOUiskaRfq4deCFCa0bde3w4Us0gqtQVwp6c2Nnoznxc 5WeH5P60icBONfz4tromtWyxKzsUKFX+iCQJ8Kf1hFjeQ5/mZy+Eo3QJagl9OlIX4XHa alCaNjgH5vATyhF/up7jQsDKcYPW8o11MrESChNdFmiJT335o+5rwTf61+yJvgC9KE5Q KQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3fs4mkk7aw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 01 May 2022 12:25:27 -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:25 -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:26 -0700 Received: from localhost.localdomain (unknown [10.28.48.55]) by maili.marvell.com (Postfix) with ESMTP id DD5C23F7091; Sun, 1 May 2022 12:25:22 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , Akhil Goyal , Fan Zhang , Abhinandan Gujjar Subject: [PATCH v4 4/7] test/event: use new API to set event crypto metadata Date: Mon, 2 May 2022 00:54:54 +0530 Message-ID: <20220501192457.3670278-5-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: N8ztXhuWelBVFxyN2aceCqc9glK4rfLg X-Proofpoint-ORIG-GUID: N8ztXhuWelBVFxyN2aceCqc9glK4rfLg 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 Used the new API rte_cryptodev_set_session_event_mdata to set event crypto metadata from the applications (app/test and app/test-eventdev) instead of using session userdata. Signed-off-by: Akhil Goyal Acked-by: Fan Zhang Acked-by: Abhinandan Gujjar --- app/test-eventdev/test_perf_common.c | 8 ++++++-- app/test/test_event_crypto_adapter.c | 12 ++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index 9d1f4a4567..0378607cda 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -835,8 +835,12 @@ perf_event_dev_port_setup(struct evt_test *test, struct evt_options *opt, return -ENOMEM; m_data.response_info.flow_id = flow_id; - rte_cryptodev_sym_session_set_user_data( - crypto_sess, &m_data, sizeof(m_data)); + rte_cryptodev_session_event_mdata_set(cdev_id, + crypto_sess, + RTE_CRYPTO_OP_TYPE_SYMMETRIC, + RTE_CRYPTO_OP_WITH_SESSION, + &m_data, sizeof(m_data)); + p->ca.crypto_sess[flow_id] = crypto_sess; } diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 688520db4e..9904206735 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -227,8 +227,10 @@ test_op_forward_mode(uint8_t session_less) m_data.request_info.queue_pair_id = request_info.queue_pair_id; m_data.response_info.event = response_info.event; - rte_cryptodev_sym_session_set_user_data(sess, - &m_data, sizeof(m_data)); + rte_cryptodev_session_event_mdata_set(TEST_CDEV_ID, + sess, RTE_CRYPTO_OP_TYPE_SYMMETRIC, + RTE_CRYPTO_OP_WITH_SESSION, + &m_data, sizeof(m_data)); } rte_crypto_op_attach_sym_session(op, sess); @@ -416,8 +418,10 @@ test_op_new_mode(uint8_t session_less) if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) { /* Fill in private user data information */ m_data.response_info.event = response_info.event; - rte_cryptodev_sym_session_set_user_data(sess, - &m_data, sizeof(m_data)); + rte_cryptodev_session_event_mdata_set(TEST_CDEV_ID, + sess, RTE_CRYPTO_OP_TYPE_SYMMETRIC, + RTE_CRYPTO_OP_WITH_SESSION, + &m_data, sizeof(m_data)); } ret = rte_cryptodev_sym_session_init(TEST_CDEV_ID, sess, &cipher_xform, params.session_priv_mpool);