From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0042.outbound.protection.outlook.com [104.47.34.42]) by dpdk.org (Postfix) with ESMTP id C2E1F71B3 for ; Mon, 15 Jan 2018 06:12:39 +0100 (CET) Received: from CY1PR03CA0026.namprd03.prod.outlook.com (10.174.128.36) by MWHPR03MB2702.namprd03.prod.outlook.com (10.168.207.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Mon, 15 Jan 2018 05:12:38 +0000 Received: from BL2FFO11FD032.protection.gbl (2a01:111:f400:7c09::190) by CY1PR03CA0026.outlook.office365.com (2603:10b6:600::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Mon, 15 Jan 2018 05:12:37 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD032.mail.protection.outlook.com (10.173.160.73) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Mon, 15 Jan 2018 05:12:36 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0F5CWCk013440; Sun, 14 Jan 2018 22:12:35 -0700 From: Hemant Agrawal To: CC: , Date: Mon, 15 Jan 2018 10:41:26 +0530 Message-ID: <1515993086-22134-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515993086-22134-1-git-send-email-hemant.agrawal@nxp.com> References: <1512642493-14609-1-git-send-email-hemant.agrawal@nxp.com> <1515993086-22134-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131604667571148373; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(376002)(396003)(39380400002)(346002)(2980300002)(1109001)(1110001)(3190300001)(339900001)(189003)(199004)(104016004)(76176011)(2950100002)(106466001)(498600001)(2351001)(36756003)(51416003)(50226002)(81166006)(6666003)(356003)(81156014)(8676002)(2906002)(6916009)(105606002)(86362001)(305945005)(85426001)(5660300001)(8936002)(77096006)(97736004)(316002)(54906003)(53936002)(68736007)(47776003)(16586007)(4326008)(50466002)(48376002)(59450400001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2702; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD032; 1:Ib0ERIcoc59bjDq14RQ1oAunUNtFOy8MUEiIy1ibtKJpv8gB95q2X8FS5LKOyMP+jq2CHk6yoDAh/T63AELpBfTWxxOPEnEGl2F59lihfBULgiPPsLOizsHNozDO0NwZ MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 850ff77f-4f84-4dc1-9655-08d55bd697d3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:MWHPR03MB2702; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2702; 3:57nAAtzTROvfjStHBRFFHBaGKFRXhYjzG+tGwxvp8ASlkRTbmYn3wiylcZfzNvW3z9uudVadRRnH3BssXK0HLSqh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5cH/BoKD5IvxnIZakiG0Q8R+6M35+YblszglsIMjl0yzai+vjXqdMmUuRK5LF3eXJx683d9JBKNIHeSPtiFu0l8+6NcKwE4NAEmO+EFCWqoDMX1KlAsjMwFkeLJSTZ0djGxkAcVxds0oiw7ZICGS8uLhGSd+37uQIjhRSf5vM X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(10201501046)(3231023)(944501161)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123556025)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123559100)(20161123563025)(20161123561025)(20161123565025)(201708071742011); SRVR:MWHPR03MB2702; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:MWHPR03MB2702; X-Forefront-PRVS: 0553CBB77A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2702; 23:b2MN6wF/99U8qpeUk+oycJjChAUxBGLhgkTejo4dt?= =?us-ascii?Q?gOjRnR6WqIKFiRkIr0+jlW1Bh4otMgh6ZXN9CQwfSvFj12tI7CaFVhUtyVNb?= =?us-ascii?Q?/9/6lJve4SbnFf3klSrJzPixBqoae/hMzN0EjbQABIs86I6CGWwIHlIMwh4j?= =?us-ascii?Q?Eqm9gE7c4B10W67H7OxbmXpNSiuSlJUblbEC3/K2HVaCkII039dDIkFj6mG+?= =?us-ascii?Q?eNStn2K7wgyPr7yicDQ2x0+A5b6ZS5GI1IbQPakXl2kqn20ak5pR6GzEr94N?= =?us-ascii?Q?Rru7GUAkvoWJzKKfwVd+xdyA8FwMHzdVzTmaqhcrfi4nbOfGMt9WooSAN9CF?= =?us-ascii?Q?7+eR1GDD+IKx0cYtE8HROfmK0Q/RVvoT79PdVNMDGNT+nxUhe1nCwFofyLJq?= =?us-ascii?Q?q3jI1QaBH5RaktN2h+VpVvSc1YidKFLpfibI5zg1DP1oT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vVdzF6ESKLicP7zmNAAgA6xhDY2eI9/JnXGCR4IFtLFluTAzawzsmWBulO/82QadQwcf8GY6u5Grhj7bNREAPNK9P0FXSht6a8U28GsOBwOp0aiSG87kEgjoUJyS/rEs85LiwntSbZ4RjlgOXzqQDs=; 5:h8z3KyUdDhSWspzHmF80eO6R+DacVEmjtOix8TNlLBXKcEYVoQl2NErWU3zcccPfcXJ9c+vl+Tv3lDusdvJVnLH64dQ1K1oX4P6wxT5xFOteiQOCDbisrWo+LnXZhagXkLPi7grPVacPrFbJ3dg070feiv9ynn98IFgLYO7hxWA=; 24:ngPn7hRLzqFEIVoVpfeuvdi+s3IHzDVnVOITjPcdg8MOJnRIubWjxFl6dxraieqmYT2XF/V3KJomo60ZN/UTaG9YfUduC/cD2kO6gjdz0NA=; 7:05pbtFk+DhuVzeSpDhrblBi17FLjNCLLUdOfJUzOEtTcEKtPA+np7cI/9U1tUc6r3pZ/bRdY53iabdGY8wvVkWAvCqWPWvK7RNnnb6/5U1lsHHHbhdSb6s2kEeHiPq43BGdX+4FLNW/0/ftn1g0cUw4Jxkl/L9hOEg50QZqIgEUjNFvXm8y8PRrSrraINRL6+678+ptVInDc3I6m2vzL1JPtZyIw8OVI5xuPvH2W/AN1TAZ93Apc6TuyRwFk0P5s SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2018 05:12:36.9588 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 850ff77f-4f84-4dc1-9655-08d55bd697d3 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2702 Subject: [dpdk-dev] [PATCH v2 2/2] bus/fslmc: clear the vfio group on 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, 15 Jan 2018 05:12:40 -0000 Signed-off-by: Hemant Agrawal --- drivers/bus/fslmc/fslmc_vfio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index fb2f403..12b254a 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -634,12 +634,14 @@ fslmc_vfio_setup_group(void) if (ret) { FSLMC_VFIO_LOG(ERR, "VFIO error getting group status"); close(vfio_group.fd); + rte_vfio_clear_group(vfio_group.fd); return ret; } if (!(status.flags & VFIO_GROUP_FLAGS_VIABLE)) { FSLMC_VFIO_LOG(ERR, "VFIO group not viable"); close(vfio_group.fd); + rte_vfio_clear_group(vfio_group.fd); return -EPERM; } /* Since Group is VIABLE, Store the groupid */ @@ -654,6 +656,7 @@ fslmc_vfio_setup_group(void) "Error connecting container with groupid %d", groupid); close(vfio_group.fd); + rte_vfio_clear_group(vfio_group.fd); return ret; } } @@ -664,6 +667,7 @@ fslmc_vfio_setup_group(void) FSLMC_VFIO_LOG(ERR, "Error getting device %s fd from group %d", g_container, vfio_group.groupid); close(vfio_group.fd); + rte_vfio_clear_group(vfio_group.fd); return ret; } container_device_fd = ret; -- 2.7.4