From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30086.outbound.protection.outlook.com [40.107.3.86]) by dpdk.org (Postfix) with ESMTP id B3D563230 for ; Tue, 28 Nov 2017 12:58:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FRTYOYajxaFnlluLYKCGuWQED9nAt+8Y8j5zMb5o+1w=; b=t47gPpZXSOrKYl7FBaNaT7Uu04Kv/YNbRu8vq7cBCb1SOY3miQKHnXG+gDV4t8xF54aFLqb9GwDGjxjH3kbZKQY3gY3Hl5RumryG5zG/VcHIW8WhvQ+8ajaQLnVtICkpoDfGsx5i8yCff+MMEDKsV83pYSjAiQsa3r2hvDoBOtM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by VI1PR0502MB3663.eurprd05.prod.outlook.com (2603:10a6:803:f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Tue, 28 Nov 2017 11:58:25 +0000 From: Matan Azrad To: Thomas Monjalon , Gaetan Rivet , Jingjing Wu Cc: dev@dpdk.org Date: Tue, 28 Nov 2017 11:57:57 +0000 Message-Id: <1511870281-15282-2-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1511870281-15282-1-git-send-email-matan@mellanox.com> References: <1511870281-15282-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR0801CA0078.eurprd08.prod.outlook.com (2603:10a6:800:7d::22) To VI1PR0502MB3663.eurprd05.prod.outlook.com (2603:10a6:803:f::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1c2993a2-a9a1-4fe1-5864-08d53657553d X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603258); SRVR:VI1PR0502MB3663; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0502MB3663; 3:rC9Hs2TM8l/HejxLr/kTCQDXmqW2226+YH3frst5xkKfTUvsRcNb2Y5aac9LMmrHBxCXVo+51k8lrz1YCSdQGrXYhnoP87V1V/sVd1TRFPTVBKUD5URaodClRO6Q8g/MheshhcBp2stx6jjJmM9Jk6+yZHfmOW6MbM7zlrD4/7Ncw6+0VpVnoX5fz9li53fpWVlZ3s1znI/nFk6alJA3dRr3b77hSIzzrwjwUMWzXM30IkBEoxcIPneUDKQXU+6c; 25:xv3JCSpeYElvRvbtB6udoCuGwJwpzEcXabBU+HxRastVYzMZcIgzS5zi9UIJgV7F7GgTCqDMcN6fNWINHJpBFxvYrWahTMZ0RmN+oQi/mCpmRf/4vySUFjcJ4Z1B5rAZ/UDjdnKJVGvKTlwq3SYGmM7AeQbBk0je3UUcJYmny4urMRBgxHcSI6I2uUmU/kMy1Gjgs5702jwyFwyKYznjDDEwef6aKgEsoYvyfjDg5jVAIogm6372naaSxb9ruH+kZ7ws8x1GacTuKeDrkHzldnTnZxxx10cCnQIbxsCtr9JrarGPJgZIJfHPFXxKNXRzc7rDfpIOPA8bI2OBMOfrxxOTReO3uO3ExnSbeaH9TLE=; 31:dAdkzpXZI4/3nWjFbKfYkJaJeOI+hSu/k+qSiLzWycO653SN3awCiCT4D/QzDOnI5fQ7Cd8AcYrDqSw5WjI8jmfzyU9IBnS7txn2DS16M4+zFwlfowIPLeu32WTO7bJpYqg9hik/cET37yBQRvMi2UeOOQ3sp5JCU9iz3CUSh41q/zB9NF8TbxYHW11KD+dSCznnlZt6DbjOJdVVCYd4wtTGljPDsbndzMrKd6HETfA= X-MS-TrafficTypeDiagnostic: VI1PR0502MB3663: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR0502MB3663; 20:S2wmVgkbqgJnHXyVGH13cWxOiiMzNtgf6kAPBfypDLBHlqF7dwgomI1QA289e6myoFZP4xyQ2vigqjBF+msc/31MwkdF+fxkVNxAJQjUeb4vqBBbnkAjttoe73nZFL0XrPWBKnKdTZZacPGsMBsh98Nf1lBPuJ3Iuyt8WKgZJwlt6qvMwBs+Db0JCId+KMtTOaA51qNXvj5lDhXPl+Tkk7xp65/2k8974M1ToZy8D8nBhFuKZsqc4bgvdR8h07ADulEqL/LkQ2Nlx1pZYFI2IhPGCj/N0i2x9R0gdMnF8uhUX2EOo/pkIRIF0nfsE+pMM1WjVoGqVcfm+re0PvgizmB2IFWhK4FYbeeUbsmip6erWeTkZqnMYgJOp7Nn5Whh9z9PuJ2oiY45Ag9CmyCd5eerzb4OV5r7H6LnMcgq3Kp3jedIx5CbGwRciAoHNWjP9kCvLogGnhV0aWFCjKC9HSDrEiDOa5E80A5IfDJl1GJhI8fpOxSXrYuQz8vFxaDP; 4:ZF968wwdsI5xcuQSIFC55bFFtRGCSa7n2xBfYApxcYCGTGIpJqUA3n6NXCymNzDuxweIEAeeMmNlSAT2BLNEVClpXYKLFeLnWCBZPw5N5XG8Q/skPkXhZ0+P/2n0Ses6M802vx7tUve03zWueitKjSAIQt+YUjYW1qjtkBrabKQfPRh4kDlqCzJ4SOG1YfXr+lpjtyKJxBSaJU9k8aoWmq8ry0E/erHONkPA0Qjru9ZIyBCUm0vSxAaQu1lxl3d7aTagnbCw6YSdsD+zwv4bDw== 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)(3002001)(10201501046)(93006095)(93001095)(3231022)(6055026)(6041248)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123560025)(6072148)(201708071742011); SRVR:VI1PR0502MB3663; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:VI1PR0502MB3663; X-Forefront-PRVS: 0505147DDB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(39860400002)(346002)(366004)(199003)(189002)(4720700003)(50226002)(189998001)(8936002)(3846002)(97736004)(110136005)(2950100002)(6666003)(6116002)(47776003)(316002)(5660300001)(16586007)(50986999)(105586002)(305945005)(76176999)(16526018)(106356001)(66066001)(21086003)(81156014)(69596002)(48376002)(50466002)(101416001)(4326008)(52116002)(55016002)(7696005)(25786009)(2906002)(51416003)(8676002)(33646002)(53936002)(68736007)(36756003)(86362001)(478600001)(33026002)(7736002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0502MB3663; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0502MB3663; 23:CpMN0J3X5sHn7i9ZfWulW6J2qyAwC9svjBBG0UT?= =?us-ascii?Q?MOfxmlv4w4lwvgW5+sKwOvZhcGZxUYpcoXl5kO82pmEpNc/EpThVhzvk7bAI?= =?us-ascii?Q?wXbCuVpsDch0Lh8PYvotrM80P9VReveVz5A3+bEduaRLcvEIwwwjBO8ZYJlG?= =?us-ascii?Q?7QTKwVOpC83/FiZq0X8Z/GLn3atRBHuCOwZNJpRvmZQpYxrUWjhVxF47uFzf?= =?us-ascii?Q?KlLYxYmrxKaGDJydGaozDl2trY/kHpP594OVzQlj41WxNspp1b5xHzCX0yMI?= =?us-ascii?Q?3IuF+5wf63Gd0z0fQ15G0pLX8RLj/4kIR+8Q0RHNRTJAZcxo11D4C+Tgi1QH?= =?us-ascii?Q?eV0Jl8y+TmlAYQdko6iSq170hgbm8PPAznnEgCOs/MPclWbtyFYZ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d+qOuy1VBSLMmWd3u7MLZOdamejLYWkeD3meIgxnlOdf9/sB+ycSP6AnxJm9NEVhvEtfmwdr8B5Poin0J47964scDd9Vvdv/LpPokfPHKFfsF8yoLXWltkrs5RMcmkC4PM0poYWHpC9uqzNuOnIjrWPNfClbl8hT2AdqDDfDMG91445JHhqcAAtH5Qwk2fIBdfyIPS5dG8xVDhbJuinmUFHQr2vg+CpwK6DO5wam0xePpmOOypRyIKPIKV5ZIF0bjRO1jnEVfSEnEsfrXtl0lmv7YjB+DG15Zq4lWbmVUM+EPtSnuHo2T/7Z9p9ZBo+h4Tr/qWcYRA80=; 5:GNTocz8E9DnPtscHJesSTHkQi6sKR8gLP3d8HH/hoGyvWhI6C8WSrZcooWdEHk1BSjn/sCIJjwEstV1J6PYbgfr8HIxJbkA6tP0d8ZWNKvMmOJ68n18Pd6Lz0xpXN0jqKnVqEu8qmWekrS7QCYgIfBrS4UmXJyCavgzAamCQYoY=; 24:l4AJjPp1ur3iFFEZWzQ9jy8d99Ho+O4XtQTqvGO0plnMvbkTNR68UQGUfpzQqZi8XXnPHS+da0qrcnshje5ayNnItMdAY7aa1uWpaoQbZE0=; 7:YSqSZ/dImQIXnclseI/G4cVTJuc9Z2bDjzMWQxS8p0KNHcT/lqChNuC+V+xYqgMqM3qgpvUF3VZvxiEtAayGHdo/sdsbx9P6pnxeEuVHW6FU7JZvWxzN5o1zh2zAP7a4v5KSOxZ7X0oyG6Ul4o69Md+0P3Qi79pjbnhdOPoAHpEssTysFXQiEuOVEYS1DTYsWaYRMH3W3ayKPnWOOQ9lw3tRjmq1DJZ8Kxa7lFAf29bD7MIOSPGULXlopCfdAx1M SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2017 11:58:25.6212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1c2993a2-a9a1-4fe1-5864-08d53657553d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0502MB3663 Subject: [dpdk-dev] [PATCH 1/5] ethdev: free a port by a dedicated API 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: Tue, 28 Nov 2017 11:58:28 -0000 Use a dedicated API to free port instead of changing its state directly. Signed-off-by: Matan Azrad --- lib/librte_ether/rte_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 318af28..2d754d9 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -437,7 +437,7 @@ struct rte_eth_dev * if (ret < 0) goto err; - rte_eth_devices[port_id].state = RTE_ETH_DEV_UNUSED; + rte_eth_dev_release_port(&rte_eth_devices[port_id]); return 0; err: -- 1.8.3.1