From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v4 2/5] eal: Close file descriptor of uio configuration Date: Tue, 19 May 2015 09:02:12 -0700 Message-ID: <20150519090212.2db24b14@urahara> References: <1432014898-3543-1-git-send-email-mukawa@igel.co.jp> <1432014898-3543-3-git-send-email-mukawa@igel.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Tetsuya Mukawa Return-path: Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by dpdk.org (Postfix) with ESMTP id 999CCC354 for ; Tue, 19 May 2015 18:02:16 +0200 (CEST) Received: by pdea3 with SMTP id a3so31105545pde.2 for ; Tue, 19 May 2015 09:02:16 -0700 (PDT) In-Reply-To: <1432014898-3543-3-git-send-email-mukawa@igel.co.jp> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 19 May 2015 14:54:55 +0900 Tetsuya Mukawa wrote: > When pci_uio_unmap_resource() is called, a file descriptor that is used > for uio configuration should be closed. > > Signed-off-by: Tetsuya Mukawa > --- > lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > index 5d3354d..34316b6 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > @@ -464,8 +464,12 @@ pci_uio_unmap_resource(struct rte_pci_device *dev) > > /* close fd if in primary process */ > close(dev->intr_handle.fd); > - > dev->intr_handle.fd = -1; > + > + /* close cfg_fd if in primary process */ > + close(dev->intr_handle.uio_cfg_fd); > + dev->intr_handle.uio_cfg_fd = -1; > + > dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN; > } > #endif /* RTE_LIBRTE_EAL_HOTPLUG */ Acked-by: Stephen Hemminger