From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id 56B7D91 for ; Mon, 12 Nov 2018 00:12:36 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id EAB269E1; Sun, 11 Nov 2018 18:12:34 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 11 Nov 2018 18:12:35 -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=V5qT8L6vvyUQtSIBBR9LUCQXWcVRmrf9wTWMs8tklLo=; b=ElUTeCNMixK4 w0gyA9EOhXLw+bR+HUkai6xOZgarartYRuWMqAkIBoQm3TUf9ZspNkEtieH3oU7a lJagozJOAc301NoZ+8JF0FpTLUaKsUjqnHH6Rsj3t2YLRVzCMWVyJJrU6hFSKfW7 g0IqhPw8eLrx9TbbEFUylsCZv9PrDmg= 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=V5qT8L6vvyUQtSIBBR9LUCQXWcVRmrf9wTWMs8tkl Lo=; b=AMQB2MDz3CfkWR39KYhHGQ9kIDQLyHS8vFlNboPckqGTtRyyAb7nguNwJ xY8+3QtpelykvZWyVFKVH4K7p3lmw9kUZEh9QYvlugvew8UJmURt7TbKW8H3AGWM Wl5TFkeVQkPfQ6Cix4togVcEbZdrjezkuaJtrRbM5KLGt3m90pwakOCSKCZUkNLW D32YlrpdVwgR7Tkw9Kgvoq1pAsjr0zVuyzlwTH2KoKaNADZElKxmugX7xpmZ0VZn 8dfSOneb3GPaTgODPWUV9G2m8CqdjtkxUhnMW8igNwDDsNDNwNq7vMhk5n2ROzO1 0MnGuxtse5LVxQXmM3AqsGfBqiBQQ== 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 40B4FE473B; Sun, 11 Nov 2018 18:12:33 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: "Zhang, Qi Z" , "Stojaczyk, Dariusz" , "gaetan.rivet@6wind.com" , "Guo, Jia" Date: Mon, 12 Nov 2018 00:12:32 +0100 Message-ID: <8836207.prvfxQgvAd@xps> In-Reply-To: <039ED4275CED7440929022BC67E70611532E16FB@SHSMSX103.ccr.corp.intel.com> References: <20181107232105.19187-1-thomas@monjalon.net> <7262839.kmssWOtaOX@xps> <039ED4275CED7440929022BC67E70611532E16FB@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] 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: Sun, 11 Nov 2018 23:12:36 -0000 08/11/2018 18:12, Zhang, Qi Z: > 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? > > Tested-by: Qi Zhang > > The patch also fix below scenario > > attach net_af_packet,iface=enp50s0f0 > attach net_af_packet,iface=enp50s0f0 (failed as expected) > detach net_af_packet (failed) Applied