From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by dpdk.org (Postfix) with ESMTP id 880F6C832 for ; Fri, 26 Jun 2015 10:18:52 +0200 (CEST) Received: by paceq1 with SMTP id eq1so64762015pac.3 for ; Fri, 26 Jun 2015 01:18:52 -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=jn1UzSJA9131uQBlmqfk7WIW5EXt90jcC8Bbw2iUD+C2Dw9qglYBTfk2DoepCwkwsP ZBOE3Q7ToLcXvrLLLVo+WzHaM9wAvLMZJZ6zrvWV8xA8Ltd7T+g+3DWmfYK5qn017Bct vTtRsS4Hs7MSHKapR+ui6zu/2kgjR9S9yNa+jHxaoD5vNhI/nSJSniI/wF4e3yjhAY+q tHdDMV37+1APIesSuqEHjN8FK8yAiAag12EO/QYxwdviCXPYN7YFWTzEl7iZstdj5Yf/ sVvc19Q6oPd4EmlzuipHTvhY/r1yGTpfm0SJA9aB37rM0JOSFYZMsmOX4nf/Mxor1YKm 87HQ== X-Gm-Message-State: ALoCoQlLMbChRLGOAOcFGeQrx+o8t+SVLKtzc4H8vFmGig38wjtHREVkWb/fEFanZ1hqxVjcdpnP X-Received: by 10.66.121.163 with SMTP id ll3mr984603pab.100.1435306731998; Fri, 26 Jun 2015 01:18:51 -0700 (PDT) Received: from localhost.localdomain (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id yp5sm32411949pbb.22.2015.06.26.01.18.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jun 2015 01:18:50 -0700 (PDT) From: Tetsuya Mukawa To: dev@dpdk.org Date: Fri, 26 Jun 2015 17:18:22 +0900 Message-Id: <1435306705-11645-3-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1435306705-11645-1-git-send-email-mukawa@igel.co.jp> References: <1435202367-8887-4-git-send-email-mukawa@igel.co.jp> <1435306705-11645-1-git-send-email-mukawa@igel.co.jp> Subject: [dpdk-dev] [PATCH v6 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: Fri, 26 Jun 2015 08:18:53 -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