From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id CA8DB4A63 for ; Wed, 25 Mar 2015 04:17:36 +0100 (CET) Received: by pdbop1 with SMTP id op1so13780208pdb.2 for ; Tue, 24 Mar 2015 20:17:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=a158Z4xiXPqAH3uU22Mnvtf4uiBW9ghbJ6AJcWGfd94=; b=jkOaHkcuD1ZOdFiQPQ9/tUABzebI8sFUy9Gd4aH4gSsrPc07fIejXs2U3guNnmNOuo ZktVharQO6BkziPapnXWD2NRc3NnSjIKSG0jM6YhsxXvl7fbU6+XtyVelw/Lvm46Az2w HEC0Kzett7ir/1sENrKccYOMe+dg5LIK5rIDlNbdQ+EajvrAstYGcxDkHP0sTruZF8cB w1+NWug1pmGlgJXVdgfnx9OLVPYlklAYs35xWG1KmPEhxM0YI0aJ6/esZ4hAm9WRRaat RcOuFa/NtcWslufG7ZwZYIN7Erd5rG6QP7PVUSWkyBA6Md33HKYZhMyBdBd97lno8IHm 7JiQ== X-Gm-Message-State: ALoCoQkZXbNuOJ2mE7nFMLXrNA3RheutyYL5kFvbZVd4CQA4yIOXpM2sMb2x1ltsLjLZMbLnIk68 X-Received: by 10.66.65.234 with SMTP id a10mr13417589pat.120.1427253456122; Tue, 24 Mar 2015 20:17:36 -0700 (PDT) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id hb6sm681885pbd.88.2015.03.24.20.17.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Mar 2015 20:17:35 -0700 (PDT) Message-ID: <551228CC.3000507@igel.co.jp> Date: Wed, 25 Mar 2015 12:17:32 +0900 From: Tetsuya Mukawa User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Stephen Hemminger , "Iremonger, Bernard" , david.marchand@6wind.com References: <1426584645-28828-7-git-send-email-mukawa@igel.co.jp> <1427170717-13879-1-git-send-email-mukawa@igel.co.jp> <1427170717-13879-3-git-send-email-mukawa@igel.co.jp> <20150324113321.789c96a1@urahara> In-Reply-To: <20150324113321.789c96a1@urahara> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 2/6] 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, 25 Mar 2015 03:17:37 -0000 On 2015/03/25 3:33, Stephen Hemminger wrote: > On Tue, 24 Mar 2015 13:18:33 +0900 > Tetsuya Mukawa wrote: > >> When pci_uio_unmap_resource() is called, a file descriptor that is use= d >> 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_ea= l/linuxapp/eal/eal_pci_uio.c >> index 9cdf24f..f0277be 100644 >> --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c >> +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c >> @@ -459,8 +459,12 @@ pci_uio_unmap_resource(struct rte_pci_device *dev= ) >> =20 >> /* close fd if in primary process */ >> close(dev->intr_handle.fd); >> - >> dev->intr_handle.fd =3D -1; >> + >> + /* close cfg_fd if in primary process */ >> + close(dev->intr_handle.uio_cfg_fd); >> + dev->intr_handle.uio_cfg_fd =3D -1; >> + >> dev->intr_handle.type =3D RTE_INTR_HANDLE_UNKNOWN; >> } >> #endif /* RTE_LIBRTE_EAL_HOTPLUG */ > > For the Qlogic/Broadcom driver it needed the config fd handle, and I ad= ded > generic config space access functions. Hi Stephen, Is this the patch you mentioned? http://dpdk.org/dev/patchwork/patch/3024/ Hi David, Bernard, Stephen I guess here are works we will need to do. 1. Add close(dev->config_fd) in Stephen's patch. 2. Write a patch for uio to merge "dev->intr_handle->uio_cfg_fd" and "dev->config_fd". 3. Write a patch for vfio to merge "dev->intr_handle->vfio_cfg_fd" and "dev->config_fd". If we already have these patches, I guess it may be nice to merge above patches first. Do you have a suggestion how to merge patches related with pci config fd?= Thanks, Tetsuya