From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Kb6RsOrcJmIceRfx9Ufgt42p0NrBgIjQrnMwv97OUsk=; b=IAeAdTnTb6qZcj0lIfwyzhWE91wMg5eZLxBrLYX+wM7CWI7oIlYNOOFQqD6kEtvAQL Z+GwQORBDobUQPgR7rzxhGyX0IQa262acsxd8+LrZrvtIQ2gvYUN+jAJ8Lj2L7kD40hU JH0hTaBoLBiQoEs02AImTtQyWe/PUSV/VaTe0YU0HZkYNQ5P3EnIFSw3CM9vmPbPvHac wdWQlCePfciIJ9zOKpOQiOa+8w+S7+A2QXgtr+gH/EMtZfbCs/RReEZLmYlNtfsHVRbn 63g5ceNEKZAdh3/aXPMyr79YsL5D8a9ldGyT+2e5obiw6Nun8M9W0lV+zF3VQCasnmqg 5MBg== X-Gm-Message-State: ALoCoQne5l4Wpn7nPa74/2pR9cvqSv6UWe6OT05TtrOA2MiNoUCswzFtIgC5Flz4x2P/KF1Kp1qo X-Received: by 10.68.224.10 with SMTP id qy10mr56327769pbc.23.1432051335912; Tue, 19 May 2015 09:02:15 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id nw8sm13517823pdb.30.2015.05.19.09.02.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 May 2015 09:02:15 -0700 (PDT) Date: Tue, 19 May 2015 09:02:12 -0700 From: Stephen Hemminger To: Tetsuya Mukawa Message-ID: <20150519090212.2db24b14@urahara> In-Reply-To: <1432014898-3543-3-git-send-email-mukawa@igel.co.jp> 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 Subject: Re: [dpdk-dev] [PATCH v4 2/5] 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: Tue, 19 May 2015 16:02:17 -0000 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