From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Guo Subject: Re: [PATCH V5 2/7] bus/pci: implement hotplug failure handler ops Date: Mon, 9 Jul 2018 13:29:47 +0800 Message-ID: <4baa2491-3f50-2a69-9ddc-9d73ee3b3644@intel.com> References: <1498711073-42917-1-git-send-email-jia.guo@intel.com> <1530776333-30318-1-git-send-email-jia.guo@intel.com> <1530776333-30318-3-git-send-email-jia.guo@intel.com> <7A795063ED59344FA044FE7D577A3D9878C6E1@SHSMSX101.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "jblunck@infradead.org" , "shreyansh.jain@nxp.com" , "dev@dpdk.org" , "Zhang, Helin" To: "He, Shaopeng" , "stephen@networkplumber.org" , "Richardson, Bruce" , "Yigit, Ferruh" , "Ananyev, Konstantin" , "gaetan.rivet@6wind.com" , "Wu, Jingjing" , "thomas@monjalon.net" , "motih@mellanox.com" , "matan@mellanox.com" , "Van Haaren, Harry" , "Zhang, Qi Z" , "Iremonger, Bernard" Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id D71035681 for ; Mon, 9 Jul 2018 07:30:11 +0200 (CEST) In-Reply-To: <7A795063ED59344FA044FE7D577A3D9878C6E1@SHSMSX101.ccr.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" hi, shaopeng On 7/6/2018 11:17 PM, He, Shaopeng wrote: >> -----Original Message----- >> From: Guo, Jia >> Sent: Thursday, July 5, 2018 3:39 PM >> > [...] >> + switch (pdev->kdrv) { >> + case RTE_KDRV_IGB_UIO: >> + case RTE_KDRV_UIO_GENERIC: >> + case RTE_KDRV_NIC_UIO: >> + /* mmio resources is invalid, remap it to be safe. */ > Better to keep consistent as: mmio resource is ok. > [...] > > Is it helpful that pci_uio_remap_resource could also remap UIO event and control fd? > So, up-layer application will be easier to deal with the un-plug event. The fd remove should be after the device be closed, since it will still use the fd to close the interrupt when uninitialized driver, and removing fd is go on to let the pci_uio_unmap_resource to do it when device detach. >> +/* remap the PCI resource of a PCI device in anonymous virtual memory */ >> +int >> +pci_uio_remap_resource(struct rte_pci_device *dev) >> +{ >> + int i; >> + void *map_address; > Acked-by: Shaopeng He >