From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas@monjalon.net>
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com
 [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 5D076DED;
 Wed, 31 Oct 2018 19:24:17 +0100 (CET)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id E8B4D2220B;
 Wed, 31 Oct 2018 14:24:16 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Wed, 31 Oct 2018 14:24:16 -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=pT9TdGV/gFh9gxH8sk5H198dsOu0bB//XvQ0NbRjpcQ=; b=juCe6a2YxkRB
 k9IKjGwhaRbtSjcPiHzSb+AY2KabtPAZ8nfzSRVU44MDGwJFHKRsJMqj2+Xhep9o
 uOWTN9HIo2dEGo6AOM4uBkzu1rzeFTH3pOlBSJdLCMT6Wd0pqGkqMk60GuDSwt0g
 LRt8cTdO8GBO1LjCnRXEDeK0kA6r2CA=
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=pT9TdGV/gFh9gxH8sk5H198dsOu0bB//XvQ0NbRjp
 cQ=; b=yi2eomxfNyx6KsxMhLAutw9gnNFDBP8Ckar2uudYPs2rhMh3H0DMY03X7
 MV5dpSLAZemn/4hH3LYTOyrdZTvqfo+HUmDtnCry77P2FSI7prQnnFqQctJXDPqR
 YSHkPsOxfnDAro0AeTRjToajJhygWBGybCYVLLu2V+JXaLKrboVJTkF3p9ACkmPX
 DfTuZEn/skSrAd7vxJxZaz6zYcCFJOLsEy/JufoWrfiTxHrvjFXTCPgRXqKbLcRx
 6mQLQUP9I5elEEvDqDva2SymC8ypNcLlH+pf6ubQdXlVt8e48Z2ZRbggGkzj8cJw
 4P+PNzDdRmVBW8Di97CsythZ7wxPQ==
X-ME-Sender: <xms:UPPZW63dd3TWRqrlovo3mVE4simMCO6qhugcG4P4W0apjVmL7GfBVg>
X-ME-Proxy: <xmx:UPPZW7bcVq_uzMlG8-KOoi2Zi4BeoOhxTqFJ228tVaPsCqHQvHgw4g>
 <xmx:UPPZW-eqkGFdh7U7i31snYU_Jx3Lqpz9xl5TJgHJ_a22yaFziRZ9fg>
 <xmx:UPPZW4rGKoIKh__fhP-MP4MqgI7FmFD9RECT5pPixZcOgs3-bnwkTQ>
 <xmx:UPPZWw8bMTrDk09st5C_P3yAbueIBfp8NNxdp23Kicmq05SdOo_CEw>
 <xmx:UPPZW78mtwURNkfe_8k1gtkxKh13e2kjObl0V4DEDj9OIv5rlCICpw>
 <xmx:UPPZWxd5r_JiPYPv_xFRJ7rI_SIU143E0A_VvxGo5rzL1MgNcLp-Xg>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 0BEE9102EA;
 Wed, 31 Oct 2018 14:24:14 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: "Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: dev@dpdk.org, "Burakov, Anatoly" <anatoly.burakov@intel.com>, "Yigit,
 Ferruh" <ferruh.yigit@intel.com>,
 "geoffrey.lv@gmail.com" <geoffrey.lv@gmail.com>,
 "ajit.khaparde@broadcom.com" <ajit.khaparde@broadcom.com>,
 "stable@dpdk.org" <stable@dpdk.org>,
 "gaetan.rivet@6wind.com" <gaetan.rivet@6wind.com>,
 "arybchenko@solarflare.com" <arybchenko@solarflare.com>
Date: Wed, 31 Oct 2018 19:24:21 +0100
Message-ID: <2723053.kYWEf3LriZ@xps>
In-Reply-To: <039ED4275CED7440929022BC67E70611532DD668@SHSMSX103.ccr.corp.intel.com>
References: <20181027032045.7564-1-qi.z.zhang@intel.com>
 <4370007.3MeJCCFLt4@xps>
 <039ED4275CED7440929022BC67E70611532DD668@SHSMSX103.ccr.corp.intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH v2] bus/pci: fix unexpected resource mapping
	override
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 31 Oct 2018 18:24:17 -0000

30/10/2018 16:19, Zhang, Qi Z:
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > 27/10/2018 05:20, Qi Zhang:
> > > When scanning an already plugged device, the virtual address of mapped
> > > PCI resource in rte_pci_device will be overridden with 0, that may
> > > cause driver does not work correctly.
> > > The fix is not to update any rte_pci_device's field if the being
> > > scanned device's driver is already probed.
> > >
> > > Bugzilla ID: 85
> > > Fixes: c752998b5e2e ("pci: introduce library and driver")
> > > Cc: stable@dpdk.org
> > >
> > > Reported-by: Lv Geoffrey <geoffrey.lv@gmail.com>
> > > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> > 
> > I still think something must be fixed in PCI scan.
> 
> We are fixing something in PCI scan, right?

Yes :)
I was thinking about not scanning an already scanned device.
If the device has been unplugged, it should be removed,
and re-added when plugged, instead of trying to update it.

I understand this is another kind of change and deserves more time
to think about the right design. That's why I will accept the v3
of this patch.

Anyway the road to get hotplug handled right is long :)