From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by dpdk.org (Postfix) with ESMTP id D6EB9C3E6 for ; Mon, 6 Jul 2015 08:25:11 +0200 (CEST) Received: by pddu5 with SMTP id u5so12568876pdd.3 for ; Sun, 05 Jul 2015 23: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=M+oZfri5mp8h7CVjHkaYX7mcqOgx5IA8EHbXWYbFrz0=; b=CO/5ziaQOT0uZ3tyQ24UO6o8UsIp/4FJ+vFVe5Z37kWSHndV7n4OmGPEbClcR7X+0N 0YZ/h//n5BhErvoIUSfm621N6LBe97np/t1j+N8H84P/3ctpTbZe6fz028tZjSmPfBX9 xPKulgx0oaHXOp2IJ98MwHZE0vAF/UnDGQVfWDWtk4wgc22X1o6CBYk8xutDdP4/4wCV oI5EN5rLbPPQ191qcmhtVhjCUwNVEXQlBbVN/uknkg5K2Gn3ssYN6objaNxHQ160/Dzj z7RrKhfc1qwp5OAiIMEttUoMzikaTOsCTbvcl+QElOVteHkaXD3B2jef6WHJCFJ7ZUiA XIaA== X-Gm-Message-State: ALoCoQmXrX+JH9aUjXM8AGLTMPPiFtTf17oK5B09ncmBxeVkpxPgC8EyJoCfmSY8vMb1LLb1nBUl X-Received: by 10.68.193.232 with SMTP id hr8mr102202584pbc.145.1436163911150; Sun, 05 Jul 2015 23:25:11 -0700 (PDT) Received: from localhost.localdomain (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id fd3sm16874716pdb.0.2015.07.05.23.25.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 05 Jul 2015 23:25:10 -0700 (PDT) From: Tetsuya Mukawa To: dev@dpdk.org Date: Mon, 6 Jul 2015 15:24:11 +0900 Message-Id: <1436163861-3025-3-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436163861-3025-1-git-send-email-mukawa@igel.co.jp> References: <1435652668-3380-12-git-send-email-mukawa@igel.co.jp> <1436163861-3025-1-git-send-email-mukawa@igel.co.jp> Subject: [dpdk-dev] [PATCH v8 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: Mon, 06 Jul 2015 06: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 5915a84..37dc936 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c @@ -465,8 +465,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