From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by dpdk.org (Postfix) with ESMTP id D7EDBC438 for ; Tue, 30 Jun 2015 10:25:11 +0200 (CEST) Received: by pactm7 with SMTP id tm7so1894300pac.2 for ; Tue, 30 Jun 2015 01:25:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OUmZspLyrnO4MRaQwnFukyVB3N2SaVhNnkh/YXFlPfU=; b=YmmY43CzO3XUmTohjXP/Dz9QcSTezu2XDDwoixXGYPr4h14wpkQ1U6yC16nVGG7bJ2 Lk0jiBiBt/8wDIe55Iq5LhEhLbmaqodIT1CCjqSkte0rs9WWauy+powWvGxVcf9czEhz TfyUPLLfJaj50wae21LiSGxNXbBVnkZ3b6TEk4uh2eZqms7nC49HiJq6llXz7ocq+Sx8 7Y5rbsB99GwrDlIDbxiuv4Q3BWkFXUNWLdr17yG6MEH2f/YwITxqRewUV6cJ6liICBZ/ 0sFPvx5xupkM7m8sW/rXIk67zxO++57J5RN61ZsRnXlagud/COYBMKCgSyZHwx/Y+xTY Y2Hg== X-Gm-Message-State: ALoCoQkiIumFA+ZLbPEx2S2KQsl266pRgI6HFZ3feLYrHiaQnn7x7Eq6UZ1t8jcdwUpqbTmnQdSV X-Received: by 10.68.65.16 with SMTP id t16mr6236912pbs.47.1435652711295; Tue, 30 Jun 2015 01:25:11 -0700 (PDT) Received: from localhost.localdomain (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id k9sm44733339pdp.60.2015.06.30.01.25.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Jun 2015 01:25:10 -0700 (PDT) From: Tetsuya Mukawa To: dev@dpdk.org Date: Tue, 30 Jun 2015 17:24:18 +0900 Message-Id: <1435652668-3380-3-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1435652668-3380-1-git-send-email-mukawa@igel.co.jp> References: <1435306705-11645-4-git-send-email-mukawa@igel.co.jp> <1435652668-3380-1-git-send-email-mukawa@igel.co.jp> Subject: [dpdk-dev] [PATCH v7 02/12] 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, 30 Jun 2015 08:25:12 -0000 From: "Tetsuya.Mukawa" When pci_uio_unmap_resource() is called, a file descriptor that is used for uio configuration should be closed. Signed-off-by: Tetsuya Mukawa Acked-by: Stephen Hemminger --- 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 */ -- 2.1.4