From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0061.outbound.protection.outlook.com [104.47.38.61]) by dpdk.org (Postfix) with ESMTP id 521C61B194 for ; Mon, 11 Dec 2017 12:13:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=sUfIE41nKql2d9DrzsoSPUUsPvMwO0LFPBrviMIT1KY=; b=lNLi5o+s2IWvvjx4/+Kcg60y8TgdHunE9Q6HQjhmMGUIEzffgAOzgcUtibV7VEh9/E++flMKsG2Uh0+gbJgaj0tCb7JdkXrYGKKwW6xbFXULCqlFF691+x2v+7v9ZcY5NltWAMWLZ/K/kYmKTJtqva80Ev9xa9m9CmOPEahk8ck= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Mon, 11 Dec 2017 11:13:16 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, gage.eads@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, nikhil.rao@intel.com, santosh.shukla@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Mon, 11 Dec 2017 16:42:33 +0530 Message-Id: <20171211111236.1331-5-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171211111236.1331-1-pbhagavatula@caviumnetworks.com> References: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> <20171211111236.1331-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BN6PR1301CA0010.namprd13.prod.outlook.com (10.174.84.151) To BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bdc4a903-05f8-48dc-c2ad-08d540882f35 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:BN6PR07MB3458; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 3:Noe0qdi2GiCsicUKnpVvQHQJT9muvEVyXGBk+MfqicMOHyHvNNu0dcCWduaGy3e6dv78n8vNg3IBWS9uxVPRdDiUS3fI73NoBQEQPbuv1hiyurfYReILUEvLwfk+o4uDoFEWbca2ovJ8i76T+qPMnBOD7wdMBygsMSFi6f0KLU7OtzJa9exCRpIFdBoSRn9Z7YCw7cg7qC0BWVx7MA+F+l7Xe/SzkKD10ttFpinF3qQgcmgY4PogWaLBONxcylZY; 25:PLyeufM0oCiRNSdLyPhEnKlWchtYTXPyoXtkfqqSCJ7bt+XGHvanjiCKTO7y/DKvhAWss49AJR8jed/abpigUJELC1AtgWxP0bIc5OP0XhmhMm0TbkATma11TPYdG/qfcww+zFujr4aD+qHyWnIcBTBvNasvFzF/f5x5YMqOQtqD+JrjGl3ONDS/jZcWtxmzJYMTiF5Im6BaIvKOr2Chw4LsXZLJs1haJbuesOIT3CrfDQRD/QT+wQUzxdHmXvm5XtiwEf4bGY5rgvh/fHWGxFXJSyQgjM7XDP/dvUomyMyxTssqCVKpFPxX+ra53qXSPnGmx8YIClyCI98rwNbRwQ==; 31:nIjIIUkZ/r2RmyZBH3xmFAxxgWiSkmw5AhDw0QpB6Cb7DlllWaQmkm6FSAl50JcyTPngoLYD3c//iyrfZ/D5XkD3J9V14fESVevDEVnBcwuKpM64A2sLnn6Xs/l136+IP8yjAq08ojESs383nVwNO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ange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(3231022)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148)(201708071742011); SRVR:BN6PR07MB3458; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR07MB3458; X-Forefront-PRVS: 0518EEFB48 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(376002)(189003)(199004)(76176011)(51416003)(105586002)(48376002)(59450400001)(5660300001)(52116002)(6506006)(3846002)(2906002)(50466002)(106356001)(97736004)(66066001)(316002)(25786009)(305945005)(2950100002)(8656006)(478600001)(4326008)(16586007)(16526018)(42882006)(81166006)(6636002)(8676002)(81156014)(72206003)(8936002)(33646002)(107886003)(36756003)(68736007)(69596002)(6486002)(6666003)(50226002)(53936002)(47776003)(6116002)(53416004)(5009440100003)(1076002)(6512007)(7736002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3458; H:Pavan-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3458; 23:KyBZdrIYihqaAOiIHRf3nPovwrquA42NYsijogRVq?= =?us-ascii?Q?4ZKHX2144bgmOA2MI2uc2vJpr0DaGoCWB5yxNLS5bpokh+oUyNbmabjkUgKA?= =?us-ascii?Q?Nuq60ATSPRMNyd8jZ7tVp1Gv6naGScVh6t2GYt2zZQ1YnuO1iLSpllC8RkjP?= =?us-ascii?Q?aPDJM9U1x/TXUkQJ+V3QUA8RpYY/uvenjYdd8ov3m/1mnREhph8tryvkLhzt?= =?us-ascii?Q?XMNJN3pzKSq3v7VIXHsPxN3Z8voiT45beg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99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2017 11:13:16.5044 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bdc4a903-05f8-48dc-c2ad-08d540882f35 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3458 Subject: [dpdk-dev] [PATCH v2 5/8] app/eventdev: add ethernet device tear down 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: , X-List-Received-Date: Mon, 11 Dec 2017 11:13:21 -0000 Add ethernet device destroy functions to stop and close ethdev ports if they are configured when prod_type_ethdev option is enabled. Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- app/test-eventdev/test_perf_atq.c | 1 + app/test-eventdev/test_perf_common.c | 13 +++++++++++++ app/test-eventdev/test_perf_common.h | 1 + app/test-eventdev/test_perf_queue.c | 1 + 4 files changed, 16 insertions(+) diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c index a2067345d..3aa12f56f 100644 --- a/app/test-eventdev/test_perf_atq.c +++ b/app/test-eventdev/test_perf_atq.c @@ -286,6 +286,7 @@ static const struct evt_test_ops perf_atq = { .launch_lcores = perf_atq_launch_lcores, .eventdev_destroy = perf_eventdev_destroy, .mempool_destroy = perf_mempool_destroy, + .ethdev_destroy = perf_ethdev_destroy, .test_result = perf_test_result, .test_destroy = perf_test_destroy, }; diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index ff5c499f9..03be8171c 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -472,6 +472,19 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt) return 0; } +void perf_ethdev_destroy(struct evt_test *test, struct evt_options *opt) +{ + int i; + RTE_SET_USED(test); + + if (opt->prod_type == EVT_PROD_TYPE_ETH_RX_ADPTR) { + for (i = 0; i < rte_eth_dev_count(); i++) { + rte_eth_dev_stop(i); + rte_eth_dev_close(i); + } + } +} + int perf_mempool_setup(struct evt_test *test, struct evt_options *opt) { diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h index 5c6a615ef..f33365628 100644 --- a/app/test-eventdev/test_perf_common.h +++ b/app/test-eventdev/test_perf_common.h @@ -167,6 +167,7 @@ int perf_launch_lcores(struct evt_test *test, struct evt_options *opt, void perf_opt_dump(struct evt_options *opt, uint8_t nb_queues); void perf_test_destroy(struct evt_test *test, struct evt_options *opt); void perf_eventdev_destroy(struct evt_test *test, struct evt_options *opt); +void perf_ethdev_destroy(struct evt_test *test, struct evt_options *opt); void perf_mempool_destroy(struct evt_test *test, struct evt_options *opt); #endif /* _TEST_PERF_COMMON_ */ diff --git a/app/test-eventdev/test_perf_queue.c b/app/test-eventdev/test_perf_queue.c index 18e1bd59b..d606878a1 100644 --- a/app/test-eventdev/test_perf_queue.c +++ b/app/test-eventdev/test_perf_queue.c @@ -298,6 +298,7 @@ static const struct evt_test_ops perf_queue = { .launch_lcores = perf_queue_launch_lcores, .eventdev_destroy = perf_eventdev_destroy, .mempool_destroy = perf_mempool_destroy, + .ethdev_destroy = perf_ethdev_destroy, .test_result = perf_test_result, .test_destroy = perf_test_destroy, }; -- 2.14.1