From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v2 2/6] eal: Close file descriptor of uio configuration Date: Tue, 24 Mar 2015 22:07:52 -0700 Message-ID: <20150324220752.45b4ca0e@urahara> 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> <551228CC.3000507@igel.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Tetsuya Mukawa Return-path: In-Reply-To: <551228CC.3000507-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On Wed, 25 Mar 2015 12:17:32 +0900 Tetsuya Mukawa wrote: > 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 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 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) > >> > >> /* 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 */ > > > > For the Qlogic/Broadcom driver it needed the config fd handle, and I added > > 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 > Yeah, that is the patch. It reopens config fd, it seems to overlap this.