From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 755281D7 for ; Tue, 6 Nov 2018 21:36:26 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1D03E220EE; Tue, 6 Nov 2018 15:36:26 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 06 Nov 2018 15:36:26 -0500 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=wu62LYDg98TVT7KpbfLPQYa+Pl5QIKeOhAc+Mpw6EDw=; b=NaHTV24scl15 Ho5GRkaQdtR8LgwpSuoxNQBZumojHn9mryrcpk5V5H6pOqYRAGYk91B0k7bQWDfI eX+cnm6oK4tLSXWlupHEBVrJF4Z+d1rQb3E98tRudxBML9NOCpDsBhRu/p4NgwlX TDEtnsxYyGz6KlsaJfIDEoNQ9638YsE= 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=wu62LYDg98TVT7KpbfLPQYa+Pl5QIKeOhAc+Mpw6E Dw=; b=o0ECvrjj4zioKit6YQFsW5aBcs3QAzeym7rLgO+9GDRpu0BznBcoBOxfc U2RWwZo8zmnk1RprQxCtzXoVuu3NTYvz9ZGU71in71KOdnIIL3dSYh5aGr3oAIgN UPptVrjgpWfxiQ+AMtFD8YUE6BTXnwcf4pZcWrGrDVBCD1/He80QQkRrCd27nJKn sHVKg7/SJy8PUjpBjvVIEZigGAB7gi0+OgQqVgu6KnoBPK+PEgaYrqygeqRLwaOL h5/Bk/vw/lHp/SiJBR4X1v6GlxCaETb3ombSmcw99jQDN/xFQBDAQw1dhDfiZ8qN LvZJ/1X4LaEuSp6zAglthgcX9+7Vw== 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 ADC7BE4430; Tue, 6 Nov 2018 15:36:24 -0500 (EST) From: Thomas Monjalon To: "Zhang, Qi Z" Cc: "dev@dpdk.org" , "gaetan.rivet@6wind.com" , "Yigit, Ferruh" Date: Tue, 06 Nov 2018 21:36:22 +0100 Message-ID: <2180900.HKzicAuZ6Y@xps> In-Reply-To: <039ED4275CED7440929022BC67E70611532E0279@SHSMSX103.ccr.corp.intel.com> References: <20181106003150.10560-1-qi.z.zhang@intel.com> <11443385.dze8hbQCXQ@xps> <039ED4275CED7440929022BC67E70611532E0279@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] bus/vdev: fix probe same device twice 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: Tue, 06 Nov 2018 20:36:26 -0000 06/11/2018 16:46, Zhang, Qi Z: > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > > Hi, > > > > 06/11/2018 01:31, Qi Zhang: > > > When probe the same device at second time > > > > Sorry I stop on this first sentence. > > How and why do you probe a vdev twice? > > if we do rte_dev_hotplug_add or rte_dev_proble on a probed device. (yes, this is not usually what an application want, but it can happen by miss-operation, and this is covered by our test case, it make sense to me that hotplug API should be robust enough to handle that situation.) Yes I agree we must handle this situation. > we will failed at the second time as expected, > but will not able to detach the device any more, since during the second scan, original vdev->device.devargs is corrupted. The root cause is we remove a devargs which was referenced. Could we overwrite the first devargs instead of removing it?