Message ID | 1503996945-62885-1-git-send-email-rasland@mellanox.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 7C65E1E20; Tue, 29 Aug 2017 10:55:59 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0045.outbound.protection.outlook.com [104.47.1.45]) by dpdk.org (Postfix) with ESMTP id 78F2311F5 for <dev@dpdk.org>; Tue, 29 Aug 2017 10:55:58 +0200 (CEST) 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=CkkaQqTj0NPvubXHjJO5yY/vgkcq98F9h5Yv+gyGcbg=; b=mK98CkWM+A7WfkLnPdkcwG0gpiKajjPIbCBH94oTIJE92o4/yqK7JyyAvLAGCngWCL1rIiZtNIF2Cvw76r/P8SoP6kwYpDJomwe0N7ctWebR+o0BPpfOFK3leAfskmJcL7ioYqOnx45AKxU1OIrpZr4cl3P/ML1spSfjpeIhvDc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; Received: from mellanox.com (37.142.13.130) by VI1PR05MB1231.eurprd05.prod.outlook.com (2a01:111:e400:582e::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Tue, 29 Aug 2017 08:55:54 +0000 From: Raslan Darawsheh <rasland@mellanox.com> To: thomas@monjalon.net, gaetan.rivet@6wind.com Cc: dev@dpdk.org Date: Tue, 29 Aug 2017 11:55:45 +0300 Message-Id: <1503996945-62885-1-git-send-email-rasland@mellanox.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20170829081817.GI8124@bidouze.vm.6wind.com> References: <20170829081817.GI8124@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: DB6PR0202CA0022.eurprd02.prod.outlook.com (2603:10a6:4:29::32) To VI1PR05MB1231.eurprd05.prod.outlook.com (2a01:111:e400:582e::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a9f737b4-ea1c-400d-9eab-08d4eebbc219 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:VI1PR05MB1231; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB1231; 3:eOCZZXeXrBSf0ngeVPtDZOGwNsTpRxtDTX5mA+rf8R9xIriSuThHpYx8AEbYpwCgjko3yjpIDtLG/w28rAjCV5a0316A7IWYriHpbmixcnj3+rqH7o0qWa8dZZ58cMYVGwuCP65t7/9W24B8TzkbnZ12WHWC3PMns4Bwhi4HyDyGbau9+FH6R6lVltq4scqYsF5O4bIZhiDY+DibyeM6ZiFHoznpRHoigsgi3EBYtPpZr3pNHP3F8t0J+qsJqLIy; 25:PyyI5aB4NKUcWfcu5SWMsFxVKF0ZDbNIRJ3u3iK2LInErxpDdBK7Wxbzs6UxL0sRDJLmBQ0yBex5NJcl+nscNcZCHO/5m2ZCNLsArEHxL2V3drT6gEjUgCz5nsau35lTz9OPExIcUPQ9RD5X06faDRjs9AAfdoNEDn/4ucoMBMrVD3Kiijb0maSYsLrFSw3PXY0wOP58hxW5lOOobE9K9hCqGmOCUv7rJ2aUNq+mScaMgTS9T6DzpEuHPyK+g0iD9IHWvKsYfkGIwV/vQMTfgi7e79WBTunUdSXSCA9vn8uC9rycP39IJnqzlflIRXXz/gNLXvG5ylQuL8X8vVIIKw==; 31:OlDToqzr30aKhJ+mNXnfse8QP3VglA33Ki660IBqzTY4vfvpmZhUF2QYB0wOM8NyUzU6lhh1jZMCpclBjwuDYUeXxPm1fFCSby523hnpH5dqPo8khHTVqMWGLfsuA2GABns3kdndw53zwEUqI/4U2etqtRXP3nUwrIVHJlreLtB4FOACEFklJC2+uzTGdUz7KUjnUP34szTeoJU5wyivTJEWe5v+4w+OLe/piOLx+II= X-MS-TrafficTypeDiagnostic: VI1PR05MB1231: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB1231; 20:o2aksMFMq5aVbEZ/cJQokKW5iD7EdLPKRyjEY7ZiFBLYproAqAIdBsQY+QtjzrSRvC4vwx3QHOzujc6cf3tBgOl0BwQGriqMFmIodNCjU5MkcJLlb28kg36No1S5EPvUPkQd3iiat1zOXA3r2dOw6mv78crMNZO3S5MqVT4QYwnPEo6+R/rUCOeIzdHxwVwf8lfGNB+vrVVSFmCG4Q0jghw9K+ipnT8kLUpV2Z7XtrL7ygpPBldBBDZXsvWhWxYMZxHEe9aZZefwcdcmk8qvIxAFXhu5Vc1U2ZnGofx02C+YN99LEYsK2qCQUPaOu97a2DgTVNaHgKEuZcDwcmuhuaZmWeAcxAsAaxOmXYIQ+mXOfLZZhjz04AyEI1PC8baVmUCNEIi6Zb8W0Givuz95ZGbYfmyCCRf9jCvvs2fuNKtOh4VFbq7XcWe7fwM73EG9DCklR0bakLm5RhuCwAolIVFDTOljRVW+zGJxLSb9i5RZJiV8qXJb8siIq07cIQR8; 4:payphLJx1DNL6dlDpxew4lKXXkpEEy4aGs77MTiXx6MtdkjWCPRMidWqfQLaFbazAh2NXPJU0q0KISswLtuBsO3gZGLdT5Quggg6IXMo4FNxwhV/gFg6kzAZ5lujizYw9WCO1x4tOUAaLK7n1IOjNwRaadEHT4a8LTohy2wTzoy9VOc+UZq40Ikozfm1w17NZ4uhGdzMzx46T26uCYd0AxDYXykSb7i1QMXOqApsQPijUwwT2XTOvbt+mWrpYHKn X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: <VI1PR05MB1231CC6FAA6140B397C60E94C29F0@VI1PR05MB1231.eurprd05.prod.outlook.com> X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123562025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR05MB1231; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR05MB1231; X-Forefront-PRVS: 0414DF926F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39860400002)(199003)(189002)(42186005)(69596002)(50466002)(33026002)(50986999)(76176999)(2950100002)(5660300001)(68736007)(106356001)(4326008)(55016002)(6116002)(3846002)(48376002)(105586002)(53936002)(33646002)(21086003)(36756003)(110136004)(189998001)(66066001)(6666003)(47776003)(305945005)(8676002)(7736002)(2906002)(81166006)(81156014)(97736004)(25786009)(5003940100001)(7350300001)(101416001)(50226002)(86362001)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB1231; 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; VI1PR05MB1231; 23:vMaU5ukq4SiYCCgX/fS+oU5byhAXvZLWVl4j1RUPU?= D028K7i3WpWCV2zpzGtg3w3laUeHUxtdaK4RKfF8alOfIlhMix+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:MHFTloDrK/p9l0OIMk4i35uJFDTEsuTL37JAmIAOHMgKWbah+W8o/KlO9l64Cj/PCavTCrMDn+LhWH9Yc6I/zid6+WQfuXN9M3uaWyS8CsEv5WND2GKzG2TzVW3ZuJWVSMr8BKAT3rbK6jhiMVa2bAdNMEOiUK5ZwzY3oijI5Q6wBRvXQvohIHWrvpTlFwnbBlXiOC0SS/8iawpF15sT9YBFEv+LRvZqzd5XtIdDVvJdHubqt+uWjmyF2E4BTU6PdY/ZGKlpgt+rN82sGRGNLZVX4EfhTwZMbcrFByiSUhaYh1LqX1xAKtMwM5Bmwpt68bK9vE4bwUHs6LmB4PyRvw==; 5:zpRNKcWN4DxIo/sQmzRwOX+UQD8OKuB2ddhDHBQbWJgLuB0W3rDcpZg0xiWGnlhyCo/9IsvGIzxqlVf/0vFhPppaTUWYcnp5AJC3+Ja7XKc+8/xClKmZY7KE3NlujKp65ssRGEKitiiQos/TtAOSBQ==; 24:c/A9tp7oN9cc15D1M/VjKqtoFwnDvDdt0q99nlVaIXoJ4l5ZRDOMRG+3Lbtkh8J1U+yy5zSEOuU17GVfX/ftj5Ejqlyie6ZkNifTK1jwms4=; 7:WIQTx7JINfFjT7bbrH4kJQCbuQjmSCtpucTE+2+P0yYONSmwVleyhQc7HpujxA3sru6PkIfVY1xruDYsOQTsWIqpwViazPpUFnBWv2ZG+aqAqRLcRC1ChihM8rH4U7s+SJASm/lxsYGinqG5iJWQxKxA17ZiCv2RPLcEpVtcRLeLsTVBMd83CuKPO4gdnrLPQJS7KcWhyXlwKhh1fbNOouonF2Tw4HCii6TmzyHjSKA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2017 08:55:54.1024 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1231 Subject: [dpdk-dev] [PATCH v2] net/failsafe: fix failsafe bus uninit return value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | success | Compilation OK |
Commit Message
Raslan Darawsheh
Aug. 29, 2017, 8:55 a.m. UTC
fs_bus_uninit is always returning 0 no matter what was the status
of each sub device bus_uninit value.
Fixes: a46f8d58 ("net/failsafe: add fail-safe PMD")
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
drivers/net/failsafe/failsafe_eal.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
Comments
On Tue, Aug 29, 2017 at 11:55:45AM +0300, Raslan Darawsheh wrote: > fs_bus_uninit is always returning 0 no matter what was the status > of each sub device bus_uninit value. > > Fixes: a46f8d58 ("net/failsafe: add fail-safe PMD") > > Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> > --- > drivers/net/failsafe/failsafe_eal.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c > index c8f4318..f6e44ca 100644 > --- a/drivers/net/failsafe/failsafe_eal.c > +++ b/drivers/net/failsafe/failsafe_eal.c > @@ -90,19 +90,21 @@ fs_bus_uninit(struct rte_eth_dev *dev) > { > struct sub_device *sdev = NULL; > uint8_t i; > - int ret; > + int sdev_ret; > + int ret = 0; > > FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_PROBED) { > - ret = rte_eal_hotplug_remove(sdev->bus->name, > - sdev->dev->name); > - if (ret) { > - ERROR("Failed to remove requested device %s", > - sdev->dev->name); > + sdev_ret = rte_eal_hotplug_remove(sdev->bus->name, > + sdev->dev->name); > + if (sdev_ret) { > + ERROR("Failed to remove requested device %s" > + "(errno: %d)", sdev->dev->name, sdev_ret); The error string should be on one line to help grepping the issue. The code displayed is not errno, it should not be named as such. + ERROR("Failed to remove requested device %s (%d)", + sdev->dev->name, sdev_ret); > + ret = -1; > continue; > } > sdev->state = DEV_PROBED - 1; > } > - return 0; > + return ret; > } > > int > @@ -111,8 +113,6 @@ failsafe_eal_uninit(struct rte_eth_dev *dev) > int ret; > > ret = fs_bus_uninit(dev); > - if (ret) > - return ret; > PRIV(dev)->state = DEV_PROBED - 1; > - return 0; > + return ret; > } > -- > 2.7.4 > Otherwise, Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c index c8f4318..f6e44ca 100644 --- a/drivers/net/failsafe/failsafe_eal.c +++ b/drivers/net/failsafe/failsafe_eal.c @@ -90,19 +90,21 @@ fs_bus_uninit(struct rte_eth_dev *dev) { struct sub_device *sdev = NULL; uint8_t i; - int ret; + int sdev_ret; + int ret = 0; FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_PROBED) { - ret = rte_eal_hotplug_remove(sdev->bus->name, - sdev->dev->name); - if (ret) { - ERROR("Failed to remove requested device %s", - sdev->dev->name); + sdev_ret = rte_eal_hotplug_remove(sdev->bus->name, + sdev->dev->name); + if (sdev_ret) { + ERROR("Failed to remove requested device %s" + "(errno: %d)", sdev->dev->name, sdev_ret); + ret = -1; continue; } sdev->state = DEV_PROBED - 1; } - return 0; + return ret; } int @@ -111,8 +113,6 @@ failsafe_eal_uninit(struct rte_eth_dev *dev) int ret; ret = fs_bus_uninit(dev); - if (ret) - return ret; PRIV(dev)->state = DEV_PROBED - 1; - return 0; + return ret; }