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 2C9D2A00C4; Mon, 18 Apr 2022 21:34:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D1034427EF; Mon, 18 Apr 2022 21:33:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 6A075427ED for ; Mon, 18 Apr 2022 21:33:48 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 23ICP0Y7032378; Mon, 18 Apr 2022 12:33:47 -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=6ZsE54J+TFtKUiVhqBBYA/62W1CvUzB5zEXbyLNGdvA=; b=U/Np+gxsAdM4/YwXi+WePccSiKjnpmme2iyKecthmttZ2hZSp8C7qZUNelzgsjp9odZk rDhwRMqvgnG5m1SqKUmY+Irn7GVw1ePa0iOO6hlC0lNrFbdsSTuxymcD1QDJRiGXXrOz o1YLO9/1XFZVpawnwnGJvjtVCD/YqIkY8UAc3nQ8V9eqQHSu8wpQVQcRdk1R4Hl4bJi2 eT7pR0JvC1m7041nWhIZIUEpMuBy04rrDvWrbBCxcVsP8z8dEjVRWgE3yzDQ4fW+DJfj bGIPd5oZDm9LVkcqQeK39P5D/Aa4JgyIyCU5oMz4z5YYdEmH1buVbOuX2lSd7fZ6if9l jg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3ffu5pgh1f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 18 Apr 2022 12:33:47 -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, 18 Apr 2022 12:33:46 -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, 18 Apr 2022 12:33:46 -0700 Received: from localhost.localdomain (unknown [10.28.48.55]) by maili.marvell.com (Postfix) with ESMTP id 93A225B6940; Mon, 18 Apr 2022 12:33:43 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , Akhil Goyal Subject: [PATCH v2 4/7] test/event: use new API to set event crypto metadata Date: Tue, 19 Apr 2022 01:03:22 +0530 Message-ID: <20220418193325.368313-5-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220418193325.368313-1-gakhil@marvell.com> References: <20220325111615.1118946-1-vfialko@marvell.com> <20220418193325.368313-1-gakhil@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: xNWdYrDh6iFT2PCxpR-PDmbPxzu0LpO_ X-Proofpoint-ORIG-GUID: xNWdYrDh6iFT2PCxpR-PDmbPxzu0LpO_ 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-18_02,2022-04-15_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 --- 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..78dfaf4cab 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); + 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..631011b1bd 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); } 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); } ret = rte_cryptodev_sym_session_init(TEST_CDEV_ID, sess, &cipher_xform, params.session_priv_mpool); -- 2.25.1