From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id D07FF23D for ; Mon, 15 Oct 2018 16:16:35 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 706EF21FE0; Mon, 15 Oct 2018 10:16:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 15 Oct 2018 10:16:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=xdWv5tKGnk/7l94zrXKNF7ks8NMaTLdhcy41nCfyvxk=; b=nwwEUkhqyBWn ArQFBWpycnraSOEN/SZlFsh6EeMOTN446IAEq3JbhTJ9kzhxDd+lAoOc1H3cShNj JimUA0SUKEjLMSTiXhTQ0GstKZBQc78GfVS+f7h8RPzi8xPiFlULN1pZVxs2dvuz yam2gXltUbibXBSF6ARR+RdH78psAYs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=xdWv5tKGnk/7l94zrXKNF7ks8NMaTLdhcy41nCfyv xk=; b=ZBC7YfD7DG+k8jkFnAft60Y7LfV6g3RKfkTGFTDWEaCkr8Q4vb9N2z4Gs PoJEYQ+G3DaBzA0TypNS06QNz4jDQRMayWjjXNEIl945K6FAWnEciV1k8MG11YGS K3t6xar0z+XvhEPPU45rmyamMCVD9v7kmFBIWu5odsktUHg2FhZvFJ7nsXGxLHQ2 Bn012CVrjf4nTI201z0iX8U1i5qwfFzEXFuZcsrKojLqJpvoX5wywLttH5bV9r6r dp/AbJIyQMhubcd8pOlaxhokHTHiKjvDgwTCUVhPFDYts0en76c3TV1+kPL7K71t Qy+YdDlG1wMs7WcV38B+Y56x9eDlA== X-ME-Sender: X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 3D0B3102D7; Mon, 15 Oct 2018 10:16:31 -0400 (EDT) From: Thomas Monjalon To: Jeff Guo Cc: dev@dpdk.org, stephen@networkplumber.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, gaetan.rivet@6wind.com, jingjing.wu@intel.com, motih@mellanox.com, matan@mellanox.com, harry.van.haaren@intel.com, qi.z.zhang@intel.com, shaopeng.he@intel.com, bernard.iremonger@intel.com, arybchenko@solarflare.com, wenzhuo.lu@intel.com, anatoly.burakov@intel.com, jerin.jacob@caviumnetworks.com, jblunck@infradead.org, shreyansh.jain@nxp.com, helin.zhang@intel.com Date: Mon, 15 Oct 2018 16:16:31 +0200 Message-ID: <2747892.zUyjEnoVBZ@xps> In-Reply-To: <4075531.4ZLKP4gcBB@xps> References: <1498711073-42917-1-git-send-email-jia.guo@intel.com> <1539602847-19220-5-git-send-email-jia.guo@intel.com> <4075531.4ZLKP4gcBB@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v15 4/7] bus/pci: implement sigbus 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, 15 Oct 2018 14:16:36 -0000 15/10/2018 15:41, Thomas Monjalon: > 15/10/2018 13:27, Jeff Guo: > > This patch implements the ops for the PCI bus sigbus handler. It finds the > > PCI device that is being hot-unplugged and calls the relevant ops of the > > hot-unplug handler to handle the hot-unplug failure of the device. > > > > Signed-off-by: Jeff Guo > > Acked-by: Shaopeng He > > Acked-by: Konstantin Ananyev > > --- > > v15->v14: > > fix compling issue. > > --- > > +static struct rte_pci_device * > > +pci_find_device_by_addr(const void *failure_addr) > > +{ > > + struct rte_pci_device *pdev = NULL; > > + uint64_t check_point, start, end, len; > > + int i; > > + > > + check_point = (uint64_t)(uintptr_t)failure_addr; > > + > > + FOREACH_DEVICE_ON_PCIBUS(pdev) { > > + for (i = 0; i != RTE_DIM(pdev->mem_resource); i++) { > > + start = (uint64_t)(uintptr_t)pdev->mem_resource[i].addr; > > + len = pdev->mem_resource[i].len; > > + end = (uint64_t)(uintptr_t)RTE_PTR_ADD(start, len); > > When compiling for 32-bit, there is an error: > cast to pointer from integer of different size > > start is not a pointer. > I think it must be replaced by a simple addition. > end = start + len; I will fix it on apply.