From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0074.outbound.protection.outlook.com [104.47.34.74]) by dpdk.org (Postfix) with ESMTP id 263E8199C8 for ; Wed, 18 Oct 2017 14:40:22 +0200 (CEST) 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=sXidM5KVI+/hhCLiipOGtfh5vQRNiJNQDwadSr7WGac=; b=H+mTcMYHo+a4DJk3lg/7G9hrdLakhPSlwFJshrEvxw1Gd6GH+YPb7b8Dq45vltXdsVx6UOMnRvfi7A3fGYOOdf33hinwECe9rrL46jYleyAR4/HzMhoQtrpSHbU4D0rE5Wc4TITf5nVFnpdSHapWyUlzhMiYodn6jhgZTPauajs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 18 Oct 2017 12:40:17 +0000 From: Pavan Nikhilesh To: 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, jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Wed, 18 Oct 2017 18:09:05 +0530 Message-Id: <1508330348-30060-6-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0040.INDPRD01.PROD.OUTLOOK.COM (10.174.214.26) To DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5a9317e6-8659-4b6e-493b-08d5162564e1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR07MB3467; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3467; 3:Pa9kCN48baREtmzo1/4SRzOKc8tSgar0UGcpgNGx0IsE5/oURZVxYqwX/IWNFnDDo//1f4Q/eBGtRy/Q9W+7HEcyXYSlKA6Aw+Kz2WVhYaQSJ54QV4ajsZ7SAVYr1ODCFgzWE3X9HzxWJu1sFyGy99wrS+ClcSSBPimcIk6O8fzKqgszCiaH7S625hAeDhv5oqtcRmgd9ARrL31OoWiQB3wt3D2I7Ehzcp1LEG+M6sHfF2JWpMb+1A/9RM/9qNTJ; 25:/HQ68OcMXVJsBtSk3yrYnLm0KlSbCC2N3565ua3aT7HfVrWQ58XFwPcKliUAL/EIg2mEgF9hr2tmyETvQEJkDvRDZbz4iJANdcWYPIrWQRRbId8QX01zozc7u9rjpWoqTJaxgVVWPxscTKS6MjRr9RzvrnfkgmybQ1sOAOVnnaYPehoTx42AQW4QbREwz0vVw42LfunkckrcK+x9sVLJtuKxNeCv07iPDE1t4V77QrsikljHOglESblfkyBdgZYFTXlRcaIZ7WhykbRgZeEO2otGRfH1S7CrYkEgZ+BJNOtNyM7bep97TU6NJlCcPoNF3bAlnGjtQZQSOPIh4BcK2w==; 31:4gCtkJy2YqlTil2tJF1SJLJ8LV0CpVkgGOjK0JS6jD1dUPgZgJJtmM0e4/Ra1NdgjWiR5NpiL6YsT3yVCRD1oxybfUxkoRZVVfR6iGS77IdF08AN9of4KwWvcA53d1QBoMkVwZ6v8RlolRw3qd1hE++w7/E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-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123558100)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3467; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3467; X-Forefront-PRVS: 0464DBBBC4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(199003)(189002)(36756003)(316002)(72206003)(478600001)(48376002)(575784001)(16586007)(106356001)(25786009)(53936002)(107886003)(6666003)(50226002)(8656005)(6636002)(105586002)(2950100002)(42882006)(8656005)(50466002)(5003940100001)(6512007)(6506006)(101416001)(189998001)(6116002)(33646002)(4326008)(5660300001)(2906002)(81166006)(7736002)(5009440100003)(6486002)(3846002)(97736004)(305945005)(53416004)(81156014)(66066001)(76176999)(8676002)(8936002)(16526018)(68736007)(50986999)(47776003)(69596002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3467; H:PBHAGAVATULA-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; DM5PR07MB3467; 23:9B9EQyPwLd1c5W73V4uNmzlwo36tcBuwl4CpAYaLN?= =?us-ascii?Q?A28RqY5aqOA2za8rJha5Vy8KX/XR0YXDy7h1HWFiJQBmoP6szjNaYeQ4rAo2?= =?us-ascii?Q?BJVSXt/MVItB59zLCOgHKt64v1tOHtHmLbQkLGn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mTGfrtuEvhVg3kiDiD5nyuJtsVxbby2K1qo1M1Vw9Rg16WKbvz90JX71rgw9iugXrEc6EwafAtrrWDku9rAFcccdHpZYSN6oTMi0uLi+Ak18IFIHGIAQCbCdjQYV5YBQsxfsl78ltaLbD9k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2017 12:40:17.2692 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3467 Subject: [dpdk-dev] [PATCH 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: Wed, 18 Oct 2017 12:40:22 -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 --- 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 aec50a8..8bc701b 100644 --- a/app/test-eventdev/test_perf_atq.c +++ b/app/test-eventdev/test_perf_atq.c @@ -287,6 +287,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 ebf8900..04c0c65 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -480,6 +480,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 5c6a615..f333656 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 4f3e7e7..16e2c9d 100644 --- a/app/test-eventdev/test_perf_queue.c +++ b/app/test-eventdev/test_perf_queue.c @@ -299,6 +299,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.7.4