Message ID | 1515993086-22134-2-git-send-email-hemant.agrawal@nxp.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp557073lje; Sun, 14 Jan 2018 21:12:46 -0800 (PST) X-Google-Smtp-Source: ACJfBovCh5NvImOkYC3p6uLBHidrq8bqZUY1oZwbU/gSGuqJL8hGLxC8ug3od/300gyHZZD9J5Pt X-Received: by 10.223.162.138 with SMTP id s10mr28231144wra.239.1515993166453; Sun, 14 Jan 2018 21:12:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515993166; cv=none; d=google.com; s=arc-20160816; b=bNyptwEFjAo0FYzSrhzDu7N5FLTxBGelaoOfL4lf+Vo4j52HUsYkAk+3pIiqmQqZbe n6hNsUz7JmV0Sp+8B9TtdI4xoJqzOxpt08vCu+4VIrlJjZjZtTnC7KA9rYyNiVPKLlQ4 eidys1hNqAplLP6jB5n0xzXch/HvTKzCSb7u7y/KqLtze2Ij4YN4ZmJo+3h0N+iCTeDy SCd7HN7w3vN9vsnukB8A026FDBotYdzQ7z27w/XNX9ndJ2YmcK3j1g3NPSdfnpk8poT+ 5suPnPPccEbo4BNEIBojB1PYmVZtoHos2eM8pZ1D2lJG6irpkwG5OMPeKESHg6MRQBYs D0/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=2m3vKP2PDQE4lnvi8yF5pC6/kLZJ5qWWCgEYndoE1FQ=; b=X1/uaZNufMbw1XhpBHCCsYq0J71FwXFl0uTFI8jmjv4vQof1dwCVGz2e/y6ItXfH1h x1Q4gCKyo8gTLgT1D5KXscfwp3wQGxLRXoUPRmimGMFvP2RsPSqhT7VMZvanl5rWcMEe yfnUeidNZsOidAfimFZlGaK3RtpYA+OvWrM9n4v7rOn2SMecQ1UNUKYBDcR+VZ7HXJfD AKMz70OSN40EcZQw0R7jkJ2RD39Ax4JFADHpvI3O6j9eqwB4vl8q0HnPQHIWcvzHRYww k9NL86fNwDwtgbEwlmRzFKIt/m5vWzMn39Dpufw4xZFszeQotd/6cIlWNQcXtZWep94k 4tRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: <dev-bounces@dpdk.org> Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id u65si5792746wmd.233.2018.01.14.21.12.46; Sun, 14 Jan 2018 21:12:46 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A4F4371B3; Mon, 15 Jan 2018 06:12:41 +0100 (CET) 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 <dev@dpdk.org>; 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 <hemant.agrawal@nxp.com> To: <dev@dpdk.org> CC: <thomas@monjalon.net>, <anatoly.burakov@intel.com> 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+tGwxvp8ASlkRTbmYn3wiylcZfzNvW3z9uudVadRRnH3BssXK0HLSqhnrZcLjpE4sfziOJptjHKj6Imr+NmZFRP2ZZukzbDJuObF2Uk1jK9x8jbbumPrMvmZyuyoU7inWyu5CzTl1va+UUzJ4ALGYvla0hqXxN+ehhDzIPqXQVBHLJ935LpYWadMF2YoY8LNBBKmdP/qBxYIwbQ1zubXIh5XCzdVoJIW+6nkN4YxqbgRhpXZB4gV0fn2hfWKu2lkxhMxgMxULweSam34Ld/r7lVfoVrRNyOZ2eTGMqdfgO2ClCHbfq+LDpSXGlwuMn5UtyrAwekXcY=; 25:SLGbjG/1hIGoKx4bMefAer6b+dl3NcsteXfbuXwosGnPrbTUwoHbc9PA6RZ2ZWBRP/hq6jlrbR5QxWqy6JBHHiGEabsjr6EAdyJ9LcGhQkWrzlb0IRtyVrwMxJos2hUvsVE1vmhiEDnoKgw8XqIHn2qxJzPIB7YCz/0r/tmjj7WXjFRLng4SXz8fwYfx7CoJ2rePrToImft+fIktp01wczj03fZkgcyLPWiYBa3Uj0lJVMmINilq0TU6NfSzoN/yzhbusNOTBykpk+biJ1nIkxITIMNbhTFxZEC04JICL6FzS6wcHl9GM8XVSnhDXiyBcjNxqbRlTq3gTzu7AXa6bA== X-MS-TrafficTypeDiagnostic: MWHPR03MB2702: X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2702; 31:EMDP9dycFORTHPw6e95mDKo5d3i2QNHvpqTFqx9ub0rPIZR6CJGZr5PN0BemyCoeUX4cDicRS5d1HnTPjUTrepegry7EnUYvct3bwnJbLyjWdK4E1xfI54ycbL0z7LlEWXknQ+PCfe6pe+7L/vaqvBOve7s1dYsg+faCYrqFSrWmvvJsb0oRfipjtt6vqj7mxmMJYj/dc+lGBk+q1FNgKJvkP3oo52b4vLFodoacIEA=; 4:gaKwrDy0V5jcTdDxxKj1oCh8dBkXsKdypsRfGUshfScrtl7yYiZskTywiJjr2OGxA4B8iuU8bEVCYEptNyeH130b3JeaPwCXpYZOmMyYQgWHosDtokjpoGl70OaRrKWMWJD9kjtulUTPnw1gmz563jE5cH/BoKD5IvxnIZakiG0Q8R+6M35+YblszglsIMjl0yzai+vjXqdMmUuRK5LF3eXJx683d9JBKNIHeSPtiFu0l8+6NcKwE4NAEmO+EFCWqoDMX1KlAsjMwFkeLJSTZ0djGxkAcVxds0oiw7ZICGS8uLhGSd+37uQIjhRSf5vM X-Microsoft-Antispam-PRVS: <MWHPR03MB270279FF4A4309C3D146227289EB0@MWHPR03MB2702.namprd03.prod.outlook.com> 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?= gOjRnR6WqIKFiRkIr0+jlW1Bh4otMgh6ZXN9CQwfSvFj12tI7CaFVhUtyVNb/9/6lJve4SbnFf3klSrJzPixBqoae/hMzN0EjbQABIs86I6CGWwIHlIMwh4jEqm9gE7c4B10W67H7OxbmXpNSiuSlJUblbEC3/K2HVaCkII039dDIkFj6mG+eNStn2K7wgyPr7yicDQ2x0+A5b6ZS5GI1IbQPakXl2kqn20ak5pR6GzEr94NRru7GUAkvoWJzKKfwVd+xdyA8FwMHzdVzTmaqhcrfi4nbOfGMt9WooSAN9CF7+eR1GDD+IKx0cYtE8HROfmK0Q/RVvoT79PdVNMDGNT+nxUhe1nCwFofyLJqq3jI1QaBH5RaktN2h+VpVvSc1YidKFLpfibI5zg1DP1oTos0dXCQ+4ES3IThEZ7YkeugLJmdMMioENTR0ALH7rVOyuXHw42zuJZGBLYc3/CGhM4EodbmeEf89ocQWaEweCt7CP+ejp+LR3u8fu7nAF8bdXzDmHH7bzakZZy9/rcgIppIpXaokbKO/7n8gK4ibX3k20QR4VQPx4fXMV2wTxD1b7OgOXLKbG4v6zhnIIvr2epW/Ocz6vE1+yKZVgKZr5Ejy4tek86a8JLRqDJLBGQ39ft8avtjBd+3Qo+8gZRBRNxofXxWgWKW95t1CQUocYEOGdJxweCPOs2a88WU8/CKKiiVwt5ofMp3E0fsqStLshSMHCJM7f3Jji6LUfIknYUFtnr10LDVT0uH+Grx8TYY6CMdoD3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K7RNnnb6/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 <dev.dpdk.org> List-Unsubscribe: <https://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: <https://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
[v2,1/2] vfio: expose clear group function for internal usages
|
expand
|
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;
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> --- drivers/bus/fslmc/fslmc_vfio.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.7.4