From patchwork Thu Jun 2 11:45:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shijith Thotton X-Patchwork-Id: 112263 X-Patchwork-Delegate: jerinj@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 2AABFA0548; Thu, 2 Jun 2022 13:46:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1769C40691; Thu, 2 Jun 2022 13:46:13 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 6C7414021E for ; Thu, 2 Jun 2022 13:46:11 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 252Ah9JH027784 for ; Thu, 2 Jun 2022 04:46:10 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=EWwqca9bfl44tYi+CKEwKsLuVj1/fyMWtgmwaP/xXZs=; b=COUEZ72I8539xehl7fdU8VZu+Z4+dgO9KgLdVrREV/C1X6kYxPPXIq57oMKDeJlp5j8H 08BhN6zXe0m/65ZmD4qjMVjmOnjrpsXylIvxfiGts3Dixtn/MsO6T0IW37uba99D+KNk N7bFpF9+a/K5CGcNHbwDRWOa8hcpTo0vJ+rcfwYgiZLHSNztLl8ttQM2G8yiUeaRj+t1 oFZC851arFYwpqeWfVT+3/aIxLTjPMr1+fiD1Y3fmtkpWdRxMThSQ1DDMC6fS0XhCdkP nprwrfTQMO1M7c+vOWjDfpQPqJPSXIHBal06jnPErAGykrFjq5l6D6BhHPltqXa0auv/ ew== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3geupu86qh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 02 Jun 2022 04:46:10 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Jun 2022 04:46:08 -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, 2 Jun 2022 04:46:08 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id 8F8F03F70B1; Thu, 2 Jun 2022 04:46:07 -0700 (PDT) From: Shijith Thotton To: CC: Shijith Thotton , , Subject: [PATCH] app/test-eventdev: wait for workers before cryptodev destroy Date: Thu, 2 Jun 2022 17:15:28 +0530 Message-ID: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-GUID: WeGmBhCJbzCn22Qq8fyO_RFE-QLM17p9 X-Proofpoint-ORIG-GUID: WeGmBhCJbzCn22Qq8fyO_RFE-QLM17p9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-02_02,2022-06-02_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 Destroying cryptodev resources before exiting workers are not safe. Moved cryptodev destroy after worker thread exit in main thread. Fixes: de2bc16e1bd1 ("app/eventdev: add crypto producer mode") Signed-off-by: Shijith Thotton Acked-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- app/test-eventdev/evt_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-eventdev/evt_main.c b/app/test-eventdev/evt_main.c index c5d63061bf..b785e603ee 100644 --- a/app/test-eventdev/evt_main.c +++ b/app/test-eventdev/evt_main.c @@ -159,9 +159,6 @@ main(int argc, char **argv) if (test->ops.ethdev_rx_stop) test->ops.ethdev_rx_stop(test, &opt); - if (test->ops.cryptodev_destroy) - test->ops.cryptodev_destroy(test, &opt); - rte_eal_mp_wait_lcore(); if (test->ops.test_result) @@ -173,6 +170,9 @@ main(int argc, char **argv) if (test->ops.eventdev_destroy) test->ops.eventdev_destroy(test, &opt); + if (test->ops.cryptodev_destroy) + test->ops.cryptodev_destroy(test, &opt); + if (test->ops.mempool_destroy) test->ops.mempool_destroy(test, &opt);