From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by dpdk.org (Postfix) with ESMTP id EF0C6C320 for ; Tue, 19 May 2015 07:55:26 +0200 (CEST) Received: by pacwv17 with SMTP id wv17so8873210pac.2 for ; Mon, 18 May 2015 22:55:26 -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=Jz0IB/WhOjuWvWv1kih6+cTPMyEa6nWI6CgGbwFR5j4=; b=OHmbmScvvDNT2CyATBte+A2ENCAtdD2SWKscnMTu/BNEdmzrARQXp8BzVgzz32MChw eig9t45YMlzWRdNzX/bVviFd5DG8jSot6r3oYol5KMi+3+N24F1t8VdwhLbnVMuKIsgV nSI68vrqs48KqxADIbxZcePLjiraxsDy9QdgR9wLbTK4ppCru3rRoYWH3nQf/LqLUCnA rOSE8tTRYBuT4L2pMmmUODOhVIO6u1o7iVZjEkDH5j3n1XWijKdpExxguRov5JavqX/G VqAoP5BceOAT8K0xdICyWRcRQqbZefI2pUDwVxrWNkGR8S1xafg4bInkdkm/sb7BDodS FtAg== X-Gm-Message-State: ALoCoQlbQUIZtGdCxtjZQA0OXqZYIwrX0+Pg3kgdpO5JNpCoMBykKcoMHFb8uNYHivY4pCazMoEY X-Received: by 10.67.4.161 with SMTP id cf1mr50840425pad.35.1432014926337; Mon, 18 May 2015 22:55:26 -0700 (PDT) Received: from localhost.localdomain (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id qz7sm11796528pbc.11.2015.05.18.22.55.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 May 2015 22:55:25 -0700 (PDT) From: Tetsuya Mukawa To: dev@dpdk.org Date: Tue, 19 May 2015 14:54:55 +0900 Message-Id: <1432014898-3543-3-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1432014898-3543-1-git-send-email-mukawa@igel.co.jp> References: <1432014898-3543-1-git-send-email-mukawa@igel.co.jp> Subject: [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 05:55:27 -0000 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 */ -- 2.1.4