From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jul 2018 22:30:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,329,1526367600"; d="scan'208";a="55380968" Received: from jguo15x-mobl3.ccr.corp.intel.com (HELO [10.67.68.84]) ([10.67.68.84]) by orsmga008.jf.intel.com with ESMTP; 08 Jul 2018 22:29:52 -0700 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" 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> Cc: "jblunck@infradead.org" , "shreyansh.jain@nxp.com" , "dev@dpdk.org" , "Zhang, Helin" From: Jeff Guo Message-ID: <4baa2491-3f50-2a69-9ddc-9d73ee3b3644@intel.com> Date: Mon, 9 Jul 2018 13:29:47 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <7A795063ED59344FA044FE7D577A3D9878C6E1@SHSMSX101.ccr.corp.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH V5 2/7] bus/pci: implement hotplug failure handler ops X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2018 05:30:13 -0000 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 >