From patchwork Fri Sep 25 07:28:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Dwivedi X-Patchwork-Id: 78795 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 559B7A04C3; Fri, 25 Sep 2020 09:29:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B9E721E555; Fri, 25 Sep 2020 09:29:27 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 9E7E71E541 for ; Fri, 25 Sep 2020 09:29:25 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08P7PrbQ002200; Fri, 25 Sep 2020 00:29: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=T7rCsCOqhpUeHb217BK1qKUi8sa5trqA7kivMspG32w=; b=eDjdeKh3sgWB+sE5eGx5FrRZAXfdSJ5lsJKVt/FWs4hJWB8L3cXoXbi8X7zPvdC8s6Cb ghqXrO5xLq6M07OYmWOUgli03r2YojsmygXDBuNM86VHooYhBzFH0esYt5Z+rWTNtAMX 2Ze1OUHHuV6QugRig5olwHgCC2oSoAjuWeNhIidBGYGcrhUJq8fpvYWqVDo9+YJ0BAvb pqu2toqvwkPi+P7IWGPyakco8sO6rUjj4+zvzRhn9g0xEidcURKXhBXSMgof+s6YfWjz WLMP9dXw/EVU3koRCl0W2EX2Fw4cgcSK4BoJEj8I1z8lJcVER/CnvHIylxQeEaKN331V Dg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 33nfbq9u3d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 25 Sep 2020 00:29:24 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 25 Sep 2020 00:29:23 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 25 Sep 2020 00:29:22 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 25 Sep 2020 00:29:22 -0700 Received: from hyd1349.t110.caveonetworks.com (unknown [10.29.45.13]) by maili.marvell.com (Postfix) with ESMTP id 067B53F703F; Fri, 25 Sep 2020 00:29:20 -0700 (PDT) From: Ankur Dwivedi To: CC: , , , Ankur Dwivedi Date: Fri, 25 Sep 2020 12:58:41 +0530 Message-ID: <20200925072841.17578-4-adwivedi@marvell.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200925072841.17578-1-adwivedi@marvell.com> References: <20200908091534.24305-1-adwivedi@marvell.com> <20200925072841.17578-1-adwivedi@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-25_02:2020-09-24, 2020-09-25 signatures=0 Subject: [dpdk-dev] [PATCH v2 3/3] test/event_crypto_adapter: free resources during exit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The resources held by crypto adapter should be freed when the test suite exits. Signed-off-by: Ankur Dwivedi --- app/test/test_event_crypto_adapter.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 572ef9c27..4b09ab3b7 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -899,6 +899,20 @@ testsuite_setup(void) return TEST_SUCCESS; } +static void +crypto_adapter_teardown(void) +{ + int ret; + + crypto_adapter_setup_done = 0; + ret = rte_event_crypto_adapter_queue_pair_del(TEST_ADAPTER_ID, + TEST_CDEV_ID, TEST_CDEV_QP_ID); + if (ret < 0) + RTE_LOG(ERR, USER1, "Failed to delete queue pair!"); + + rte_event_crypto_adapter_free(TEST_ADAPTER_ID); +} + static void crypto_teardown(void) { @@ -941,6 +955,7 @@ eventdev_teardown(void) static void testsuite_teardown(void) { + crypto_adapter_teardown(); crypto_teardown(); eventdev_teardown(); }