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 817214CAB for ; Thu, 8 Nov 2018 13:53:22 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 195E321BE2; Thu, 8 Nov 2018 07:53:22 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 08 Nov 2018 07:53:22 -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=5RZacwgsut2fC/Vxu23fEmHzSFNNUgMJfJxraSbXBng=; b=eaPOivLfA01q 2cZC1NBayJG/0XfkE5D/OIt2fDMyA+5avxDy07heUWaOdGEBaezuHSLj9g3yY29Y 5rj/84QC2KbzrIvm9EBXfo/txQlkweI2iBuZA4YOx6kot9ZznwDyLIdUjmPhghZz hTmjYNhpGzU9JYtcBjDDCz/vQBKUWBk= 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=5RZacwgsut2fC/Vxu23fEmHzSFNNUgMJfJxraSbXB ng=; b=AJLHmAzY6MHm4RQVA1YBA/2i4Ib9iMv+zemb26xvVe5nxrpu/srXCg+03 /SSQwYn6Tk49Rf1efwh88Z3nMvEQ1DJQF6FObDha7Tvh8QS0hpS3xEeQk9PNlIRy ghiAaoJwqqO2cWfqe6Sj7E8G4M0kFq6WgtUadt49w8WqxTO5TqWVyEmtgMNdla7X oM3x6QRL58gbcbTKw1Geo1JrmcahIY3egKRVMof+1zihFttgUEtkk5IPUdoG2ES+ kyEGRW4clc6Qz3gRMhdsQntHVWq2ZtqHKvqO5T6bNEOuNyoC6tNCJMuqCV0zw5oI R3tBwe4DyOX42eExuIWXCtrTpPEzQ== 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 BD3B8E467A; Thu, 8 Nov 2018 07:53:20 -0500 (EST) From: Thomas Monjalon To: "Stojaczyk, Dariusz" Cc: "dev@dpdk.org" , "gaetan.rivet@6wind.com" , "Zhang, Qi Z" , "Guo, Jia" Date: Thu, 08 Nov 2018 13:53:19 +0100 Message-ID: <3095983.aBgvmuOXeg@xps> In-Reply-To: References: <20181107232105.19187-1-thomas@monjalon.net> <7262839.kmssWOtaOX@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] devargs: do not replace already inserted devargs 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: Thu, 08 Nov 2018 12:53:22 -0000 08/11/2018 13:35, Stojaczyk, Dariusz: > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > 08/11/2018 12:25, Stojaczyk, Dariusz: > > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > > > > > > The devargs of a device can be replaced by a newly allocated one > > > > when trying to probe again the same device (multi-process or > > > > multi-ports scenarios). This is breaking some pointer references. > > > > > > > > It can be avoided by copying the new content, freeing the new devargs, > > > > and returning the already inserted pointer. > > > > > > > > Signed-off-by: Thomas Monjalon > > > > > > Tested-by: Darek Stojaczyk > > > > Is it fixing any use case? > > Of course it is. I was previously seeing a regression with the following scenario: > 1. hotplug device in the primary process > 2. start a secodary process > 3. hotplug device in secondary -> primary segfaults > > And now it's working. Good to know! Thank you