From patchwork Thu Mar 12 10:17:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tetsuya Mukawa X-Patchwork-Id: 3978 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id E80796A87; Thu, 12 Mar 2015 11:18:24 +0100 (CET) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by dpdk.org (Postfix) with ESMTP id 22A3E6A87 for ; Thu, 12 Mar 2015 11:18:23 +0100 (CET) Received: by pablj1 with SMTP id lj1so19355462pab.10 for ; Thu, 12 Mar 2015 03:18:22 -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=fUAdTNi/n7sIbg64OKXzn5jtNe5SQTE6pzbXWR7fKQo=; b=Bsrrb/JG2BicjVouSYHluYkMToYIjjamE96sVnDG5AhfnCZp9H5vQeyhXU5LVnXsVP iONLzS47UB7yx8BAs2wsYMwyF8IVDuScEK7e2Y7ZxOpJRZ3CdN9UQ1CUgBuE1QL+k1kE w6LqZ5i0lumPG4tmvA31fRVE5nSkUoelM04c49GA8ZqCJnd1Fm9EnvrniSYx9oE1nmdX 4d+az/RqvLLJ/JKhGm8d/kHw9ySGy21ii58B2hReXhUJDy30TkBtfoe7CGMlEwWEJTF7 yrlu0OyfPKVwx3Jm3tmqjzDF0+xKBSw9SQuGrc5mrn1bJPfl4vYRAmlk6Wy9sjOOx5nv RoeA== X-Gm-Message-State: ALoCoQn1RpekabFTk8MUX2nfSNcr8O26lwBjLbzSM3KfY02jJIqI6FoVB9YSoCuczUlMG4Dk07Au X-Received: by 10.70.26.100 with SMTP id k4mr88338482pdg.125.1426155501399; Thu, 12 Mar 2015 03:18:21 -0700 (PDT) Received: from localhost.localdomain (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id z4sm10080331pdi.90.2015.03.12.03.18.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Mar 2015 03:18:19 -0700 (PDT) From: Tetsuya Mukawa To: dev@dpdk.org Date: Thu, 12 Mar 2015 19:17:41 +0900 Message-Id: <1426155474-1596-3-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426155474-1596-1-git-send-email-mukawa@igel.co.jp> References: <1425438703-18895-1-git-send-email-mukawa@igel.co.jp> <1426155474-1596-1-git-send-email-mukawa@igel.co.jp> Subject: [dpdk-dev] [PATCH v2 02/15] 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c index 6f229d6..77bb5ed 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c @@ -462,6 +462,8 @@ pci_uio_unmap_resource(struct rte_pci_device *dev) /* close fd if in primary process */ close(dev->intr_handle.fd); + if (dev->intr_handle.uio_cfg_fd >= 0) + close(dev->intr_handle.uio_cfg_fd); dev->intr_handle.fd = -1; dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;