From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D86A36837 for ; Fri, 13 Mar 2015 14:54:41 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 13 Mar 2015 06:54:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,395,1422950400"; d="scan'208";a="466833171" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by FMSMGA003.fm.intel.com with ESMTP; 13 Mar 2015 06:47:32 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.218]) by irsmsx105.ger.corp.intel.com ([169.254.7.117]) with mapi id 14.03.0195.001; Fri, 13 Mar 2015 13:54:27 +0000 From: "Iremonger, Bernard" To: Tetsuya Mukawa , "dev@dpdk.org" Thread-Topic: [PATCH v2 02/15] eal: Close file descriptor of uio configuration Thread-Index: AQHQXK3nhRhR1T1K0UKpH0U/KlkPip0acKdA Date: Fri, 13 Mar 2015 13:54:27 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C2049F295D@IRSMSX108.ger.corp.intel.com> References: <1425438703-18895-1-git-send-email-mukawa@igel.co.jp> <1426155474-1596-1-git-send-email-mukawa@igel.co.jp> <1426155474-1596-3-git-send-email-mukawa@igel.co.jp> In-Reply-To: <1426155474-1596-3-git-send-email-mukawa@igel.co.jp> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 02/15] eal: Close file descriptor of uio configuration X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2015 13:54:42 -0000 > -----Original Message----- > From: Tetsuya Mukawa [mailto:mukawa@igel.co.jp] > Sent: Thursday, March 12, 2015 10:18 AM > To: dev@dpdk.org > Cc: Iremonger, Bernard; Richardson, Bruce; Tetsuya Mukawa > Subject: [PATCH v2 02/15] eal: Close file descriptor of uio configuration >=20 > When pci_uio_unmap_resource() is called, a file descriptor that is used f= or uio configuration should be > closed. >=20 > Signed-off-by: Tetsuya Mukawa > --- > lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/l= inuxapp/eal/eal_pci_uio.c > index 6f229d6..77bb5ed 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > @@ -462,6 +462,8 @@ pci_uio_unmap_resource(struct rte_pci_device *dev) >=20 > /* close fd if in primary process */ > close(dev->intr_handle.fd); > + if (dev->intr_handle.uio_cfg_fd >=3D 0) > + close(dev->intr_handle.uio_cfg_fd); Hi Tetsuya, =20 Should dev->intr_handle.uio_cfg_fd be set to -1 after closing it? Regards, Bernard. >=20 > dev->intr_handle.fd =3D -1; > dev->intr_handle.type =3D RTE_INTR_HANDLE_UNKNOWN; > -- > 1.9.1