From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0044.outbound.protection.outlook.com [104.47.36.44]) by dpdk.org (Postfix) with ESMTP id 986F5293B for ; Mon, 11 Dec 2017 16:14:26 +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=GVoAOm1PeU/lRg9Lnr+e0IzCo9MCYIBr9nIAovsu2uNyFR9raoWRLUi6ooQptnnY2uqvt+EG4nFSUsW3GYbUFBe7qqNLNUGVZzlCYE3iqi9Ox5D3Z3COuQ+oLLOy6SXHkWzTwcd95ASm+vD2EfRR7YKZF4xiVJ34bSnD6eLgmRQ= Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by CY4PR07MB3463.namprd07.prod.outlook.com (10.171.252.144) 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 15:14:21 +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 20:43:43 +0530 Message-Id: <20171211151346.14405-5-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171211151346.14405-1-pbhagavatula@caviumnetworks.com> References: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> <20171211151346.14405-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: DM5PR13CA0046.namprd13.prod.outlook.com (10.168.240.160) To CY4PR07MB3463.namprd07.prod.outlook.com (10.171.252.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4402b59e-255e-4ea4-702d-08d540a9dd0d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:CY4PR07MB3463; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 3:9pQbGZf/V73D3TsJoJKDuSTLVXso85tzYTHAMZRMlZPhluOZxwuJwkQVm9u1Gl1vHlJlcrJuKQ+543dfIXu2xbyylAJBc63V5ox45uooUDke5LKJVFA3IQceMgtiiiRo8bg21RWRc6Z23K+6e/D80/l6AyHYdC3UzoOS9k+NPgI21bul/H2aowOHhDL1bVqFRyU+uQph/oOhrcODBVlRLHHxWRP9wfWQG6czJOTGjFPbgGSwIvHmWQis4VhkigJw; 25:c3HCxcPEL8Cg2jqPzZMgN8vr+hJfxT2UcniPjiIr8ncBLHi/NL9evfZgtHr5N5YkWYCCZGXofm+61cRx2eLKB8b3du6LPmNvH3sUR9q3ld9L4+2K6rz2Z06D9a8SheeeIfTMMaPyQx2SyZqng/oLg755d7UljhkaN4hP0HO1GtOImN/6UZJkXnqIHvJIXhdZo0hMyLNut5BzOj+TbHf+CMfX0TJsQVcN3+P9BrJHk4wYZ+Oa8S6O2mroX9e/fPnDt2asVCBsbB84OCpjUgAViyqqsbo8xcgtWjaxDhTMWdDgmACBg3gFtslvJxG6JwiIzXXIJimX6ivPHfPP3kp/qw==; 31:AXCxueqSLNydZNB0RAQTjxcaujWe4x1NH6DfnzzAfJXdkj+eiuTDiNE2ubXkstIDO2O0/mITaFopis/dbgaD6nDMFl4yIcqdYHzGZb+wR7L6ocVEtd/ylls+UWMMZzl2qPHVHjJO71g8WbmhVRLzQj5smRtsTTXzSc+SuRseOH+lAGEvEtU0ouEuTQtyCB1DrvjIW5V2oc0v+eUaL/9S3TcrgkdQTtt+d2Sx9fRsN3g= X-MS-TrafficTypeDiagnostic: CY4PR07MB3463: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 20:hsQVoMjcJTFgHZ4tArKHofkEPZL76D8w9426pqtj91A1VMCBDZVPDqAYKMD4AEAkhEBwpKGfn46BgBD+EYTIknT6AmKo6Y9Vy+g5Md4FZPZ1QX1ktHf6whINaZuQOuYBJyuowUlX2yb1knUvB+98dHAIjJMqU3eUhR62xiAJAUdB6fosAqMP1D0c1TsE1iezi0YR86IHrqVuNaPZqCvhwko51Jto7bQduq3qQ6R2m2N0qhF0FxW7rSFn7Q1a50UjRPJ+H/4HhmvAjhboabycvaQsgOWRBfFS4hIyrM7UjzTwNfF4J7M5QRx4TTfQ5RghPHZ20rZOHaTq4yNULxqcbspuwE/CM4Ks7Dp90ItDuFVQJh3hJ22djHTZYlASVxbbvtPUEj33MW/JyWRjCNSY0ClgIGfdiu7zWz8gOIFLfloxgVmCyX3ohBmBaMVmJUl52qVn6+ilEewnQK3tpYAe3B9geSlisw6AkRlBdR9U+tLZBPjvsnIPkcJU3qzlRRI66UQ8skbwhMYbRCg1CyqkyRwjg1W3Uldi7Q6nsJQQkLr6WRpEEWl3WhJabEWFaTQC7D3EcuWspQ5B0bUfNzBpjMYocWPiAdHT6f3O78QXKyU=; 4:FHxYxDjyLFZCGcWau1LHuAO+LdGGy9Y7sTAk7q53olBtRx9amhYb/SqLYExsId8F33ECO7t5dV6boGSzg6kPxoYfg2xez46SG6F4OcgRF/hxQsUbhrxU+oQ6kFpN5ePIix0yM4UBVGxVHEbhxUs9IYQISE+bHZlf1QMdtfrjEms4xFSvlkh6l7bVG/pCSceLJCBoO14mxkLpJ9PDPCO2sAf55Lg1PsRWQNbZpXb5FujKmHdvwH6brWr86a09ePMNs+kJdKM/5ukYjf9PqWWs9A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(3231022)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY4PR07MB3463; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3463; X-Forefront-PRVS: 0518EEFB48 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(199004)(189003)(97736004)(53936002)(53416004)(106356001)(16586007)(105586002)(8676002)(25786009)(1076002)(8936002)(107886003)(81166006)(36756003)(50226002)(69596002)(7736002)(305945005)(66066001)(50466002)(6506006)(4326008)(16526018)(6486002)(81156014)(3846002)(2906002)(2950100002)(5660300001)(42882006)(6636002)(6666003)(6116002)(316002)(68736007)(47776003)(478600001)(72206003)(52116002)(6512007)(8656006)(48376002)(5009440100003)(51416003)(59450400001)(76176011)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3463; H:Pavan-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; CY4PR07MB3463; 23:M54bz8RyOH/b3TtFfWx2Obzm8Rf78LEJirLdDzrde?= =?us-ascii?Q?+bmo0vzApS2vzoRnHPdZs0OazKTBInFtqZsiXZdGbSWtLA8rcEwMnrI0VjDT?= =?us-ascii?Q?gcK7cv8E3gzvIgc8jD0eQEpmZ1x1wJXhLS7Gp01wIJGskUM7/jl/NK0lacY6?= =?us-ascii?Q?3lAix+ojSxzxSLp1Upw8zctHV0CvBQRUInmxcEaMSHdk/2FW5ZD+FCv9RsTz?= =?us-ascii?Q?HawNFV3vpjtukZo4x7zE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ticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2017 15:14:21.2901 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4402b59e-255e-4ea4-702d-08d540a9dd0d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3463 Subject: [dpdk-dev] [PATCH v3 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 15:14:27 -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