From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0087.outbound.protection.outlook.com [104.47.0.87]) by dpdk.org (Postfix) with ESMTP id 38AA83237 for ; Mon, 7 May 2018 17:10:49 +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=HuWz367Qc5G+7bN65Wpn2m6eUcCKIxUysqD8Jc9E1IY=; b=gPw9bZP/El9Jie84bbY2xgnA9UAmuzgYAFM7mCiYZ3P4rYg3G/GzdQEBqGjZRs3rGktyiMCpJWIv7E6QoEYP+viM0dXZeSpcMmm/ObEp1MydJRzIX8MNTTBoT0tdTLFJpgTN0irzideScH7ASO8Xb0cPVJl3W6E9hNnrpaWeByU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; Received: from mellanox.com (37.142.13.130) by HE1PR05MB1257.eurprd05.prod.outlook.com (2a01:111:e400:5889::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.18; Mon, 7 May 2018 15:10:46 +0000 From: Raslan Darawsheh To: shahafs@mellanox.com Cc: dev@dpdk.org, thomas@monjalon.net, ophirmu@mellanox.com, rasland@mellanox.com Date: Mon, 7 May 2018 18:10:33 +0300 Message-Id: <1525705833-8573-2-git-send-email-rasland@mellanox.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525705833-8573-1-git-send-email-rasland@mellanox.com> References: <1525705833-8573-1-git-send-email-rasland@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1P195CA0036.EURP195.PROD.OUTLOOK.COM (2603:10a6:802:5a::25) To HE1PR05MB1257.eurprd05.prod.outlook.com (2a01:111:e400:5889::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:HE1PR05MB1257; X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1257; 3:KBMCwL3IqTgVzsru7c8pGfXUex6DEqf+3HVdkTmmYO9sqMFhuhZIT4Ln4+/6SpmQerj5H8fpsiIRo9lEgl8YqwH3jiwyZ8XioGCghoJOCYpKV6HI9NKmeychRu9Fvpgh+ig5EeuTnevfr9GSdfR6iVSLQTXy1zSkwKK3+T6K5lHb5/9jHh8rrvjxXP2hhpGJOf4G+jkcitSsbGPFft6zblMVf2ME7HEyFzEjooOuha77bwXCkkUa8XrRGg+uF3pi; 25:0XcbNJLs2/xZNivUgeo1AOWuyMSmnajNwMry9GRMXIgnOl/S4vBfxyFNXYnGqYPeF1jMYPD+c2NPyL1vbxATVjqGRQVd4T7lNZ31MThUCBLb0ewpmwcwrvVHgEtn+j/skJTuZX85gD48wDAtbXMtibm/jvd6tyabdgJitmX4O6yqNmnzGVEeIYiw0YK+3qUM/eIGJy587eCNKFLtNSoW1yJ9kpn8nNPWAIhM8EsxocEYmYUHjCTrKqds/bx13mDiaWV2zUzJlxmMrpWAdvQJ0ocOb8/kMQ2zgG18i6gGnxZn0lu6gF7VBycN3QnzDN9BVuu/5zcZajoNGAcpyeZaqA==; 31:8YrFRizHPSWl1iVTvsxg+wlesFVNMdVHkuWNHIsi995BKkYEdzhg39LLskSyW+HSnxNU70NN/WnXkPERwM28UvtSAmPXwlr5KVPWQFkgUJkU+Yro5uNG1D/tW3NPe0De0HfecZkeBHR8Ct0tjhA626ivxCyevNENh2zNsbshOfcIVD/Pic8IYhk02Qe+yoJyaoGtgpyW64FOSYHCo3o7YfA674yaNobkcam81YfNutQ= X-MS-TrafficTypeDiagnostic: HE1PR05MB1257: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1257; 20:kxPfPzgW0Be0HRmlhAmsIgzQpC3ALXKH0kqMqElwwgsKc/BK28QZx5hV2+jcSbxxR4yjJ1jKipi7bob3MponpWMrNfuQgnz2JKWw/893gdS6IjFWdmwBbeAFTwdUA+D8XchM+4d7O4L1D5niLAtcok4ylXYDKXdBxoTfLQ4jHIm0TyjhZgY2UOSUm6kN9e4hA1xJSLLxgAAaExgkMAo1ARkdFrc8nuBFqc+OTs4CoBEwRpSTszJKEV1BfZH02G6uVuTZrPO2TGTEAY/g49TCsUbmSnl9a+5eF58Dd+Cun3vJxpaKskYkm22kBJ4rCXC/fD9FjS0OCFBBZQGmLARNmrW+ogyFNDO1MghzTsW464vjYnCvrXrvE9cPZSolKnZdZK/76P99B1bx4tAdiP+tK8wQ3YPRPBavRI8w1lY45kHgVlZwVxd2tClPc3Bl0aqvG8vl8liU5YYwQYNjHSW5Bu4+nwSB6dQtr0nK2B5yKA3sHgM/KSWF0yMlhIM9OBt5; 4:8J8BsfX1XFgzWelp4jESx6BPu9X2LwmQtyIkQwc2kFiwRxd1uHZMReoZgZjsOHObjMmVc9Q2dfNZ17nrPBVBJkJLBNr6+LtVBm08NsWaZ5ljlWfP9ZMM2Dtt6cffDADFyHtQa3zU8Zy54rM8ofe2T7Cu+VRdPkrpTT7XKustcPzsYTSB8WW62s/R3lSSIkN2bbGzPIm+vbA08yIY8sjJTo+jb/fZgnwhWAY8NhU9QgytK7XwdxB5Lk8fDWeR+E1lyHxu38T7wx3MsP6iHhXsuw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:HE1PR05MB1257; BCL:0; PCL:0; RULEID:; SRVR:HE1PR05MB1257; X-Forefront-PRVS: 066517B35B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(346002)(39860400002)(396003)(366004)(376002)(199004)(189003)(50466002)(86362001)(36756003)(69596002)(5660300001)(66066001)(21086003)(25786009)(105586002)(47776003)(106356001)(4326008)(6116002)(3846002)(48376002)(6666003)(6636002)(305945005)(97736004)(51416003)(107886003)(2361001)(33026002)(2351001)(34206002)(76176011)(7696005)(52116002)(16526019)(26005)(59450400001)(55016002)(486006)(11346002)(476003)(2616005)(956004)(446003)(16586007)(316002)(37006003)(8936002)(50226002)(8676002)(81166006)(81156014)(68736007)(478600001)(7736002)(2906002)(386003)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB1257; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR05MB1257; 23:LSlSmfbi/felp5AYd4Xo+nRuwg8ePr64iolIRMZ/2?= =?us-ascii?Q?ifVDaCbEgdERNLHvmvd/MCY/1H8DhwtLRlS0pFkd1aP7K1ZSbwE2n1Bxx92T?= =?us-ascii?Q?cWBRjo7BNEu1T9LzsX1mrKZXuO1SqAGIVgj6If5UBUewXSdoxnxnww0f1uzK?= =?us-ascii?Q?3Fq09oQy4WDd1izCKWvu/oGiLyrAiJARkMhM++qbFT6ldKGn/YCzCGoWlfiR?= =?us-ascii?Q?f5J1ujlnCWpGyY8TVqeuMge93KODWlfRZ3sRYEDHpZ5n5cUKj2zBoLbdJJTL?= =?us-ascii?Q?YgVo73n7n5Hq7/vWM65kacVCLHL6WZ/Td5Zpmh4BcwrxfHgsomA1WXqPS1+1?= =?us-ascii?Q?zXnjQAjfhoefLkjGCyhUWyhpTLN/xWNAHWLsfmQcd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IIQL7yFVnqG3rihU6HZ77OwnVWYonTplIRRZ4iE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1257; 7:JIxmFliY6cvUrf9rb4FGWaNEPdIDvXyQueJ4guB94Of8aEk27DUSW99G5j+tp6X5kOm+hzUMU2KqHIimKikn7SyW/RDY4oCqpd6g7aGrZHy93Jou9wJO5pYble3t6tCZyjEqRHF9SAUlpV30R8s/gOC2VS3g25xYMXfO5+n5uMQKiumUnZ6JM4Vje3BK7TkgDxGdeHd0v3Mf3ctXZVtWbxhA2KLrRytSgV05HMxjLIwnUMeEV8cZH/mzQnnYmghq X-MS-Office365-Filtering-Correlation-Id: ac0dcc8a-e3fa-4944-5fe0-08d5b42cb659 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2018 15:10:46.3507 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ac0dcc8a-e3fa-4944-5fe0-08d5b42cb659 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB1257 Subject: [dpdk-dev] [PATCH v2 2/2] net/mlx5: free eth dev port in case of error 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, 07 May 2018 15:10:49 -0000 If something went wrong in mlx5 pci prop need to free the eth_dev that was previously allocated during the port setup. Signed-off-by: Raslan Darawsheh --- v2 changes: Reword the commit log. --- --- drivers/net/mlx5/mlx5.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 3831e3d..bffe90f 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1063,6 +1063,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, claim_zero(mlx5_glue->dealloc_pd(pd)); if (ctx) claim_zero(mlx5_glue->close_device(ctx)); + if (eth_dev) + rte_eth_dev_release_port(eth_dev); break; } /* -- 2.7.4