From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by dpdk.org (Postfix) with ESMTP id 6E6515FEB for ; Wed, 8 Jul 2015 12:35:39 +0200 (CEST) Received: by pdbep18 with SMTP id ep18so143603329pdb.1 for ; Wed, 08 Jul 2015 03:35:38 -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=PtKMCm+ZmUiZ5myBnwWb7zEBHrJRfp1FBBCUGgE68Ok=; b=dOTsXqzo/s6LYkeWENDtNALsmOjQZqlH1YF7o02lK+V2yNlTvmziDyLOX/zq9HEfON gDKP/VLNZ0gBb9MTO1ERZ1lpZAhnn7IEfxOrSy6jcaC7Y1oO0+pEwewvR1EoGqkRN+NP uSTQFZLNtwCx5DxzmLidgjLtt/9U9FHGbMI0g61t+UcwkiZRR7CB2JdZq6pSd1DWkVV4 /Pq6o4s43FmIDjUasMbsYK1JcvHFa+rrlrhQwYIk0K5+CYFbCOBXLAaBVx4wDyiYJNxt SsHuxXiwL0jK0Jk67gmS1gYl1xeev1AK9q8nBFw3qkM2zfbEQjcTtqG6HsozLb3A26Kn dFUw== X-Gm-Message-State: ALoCoQnJxOevmC+MPcB2iw/SuO3MpgA0/gX1vI33VD0eQmA8ny9T6zVGmbuskPWGmaMODDEuoX+6 X-Received: by 10.66.144.40 with SMTP id sj8mr18806480pab.55.1436351738849; Wed, 08 Jul 2015 03:35:38 -0700 (PDT) Received: from localhost.localdomain (napt.igel.co.jp. [219.106.231.132]) by smtp.gmail.com with ESMTPSA id xf2sm2043139pab.25.2015.07.08.03.35.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jul 2015 03:35:37 -0700 (PDT) From: Tetsuya Mukawa To: dev@dpdk.org Date: Wed, 8 Jul 2015 19:34:43 +0900 Message-Id: <1436351693-2349-3-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436351693-2349-1-git-send-email-mukawa@igel.co.jp> References: <1435652668-3380-12-git-send-email-mukawa@igel.co.jp> <1436351693-2349-1-git-send-email-mukawa@igel.co.jp> Subject: [dpdk-dev] [PATCH v9 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: Wed, 08 Jul 2015 10:35:40 -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 Acked-by: Bernard Iremonger Acked-by: David Marchand --- 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