From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 996D01B453 for ; Sun, 25 Nov 2018 13:28:52 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 366B621673; Sun, 25 Nov 2018 07:28:52 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 25 Nov 2018 07:28:52 -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=jxEYmWYVPZHXGs0pzml6CQzRmWfJZmzs5PlDGJqc8gM=; b=J6oSqRF3i3Pf JZ1C7JKDLrXdv+4ps/1raYlJZOzDArx/KfQgRd0tTyXLH6u6DlXGSeQ8wU1m7FNX mNvXthF5cNnpBkZVF8uUgPlpjQ4NAsnP27JWQ+Z3tshCa2MjT6uTdoPeIBbHYfsW ryC9Qo+EkA2I48FT0mqv9h2YZ8xjxds= 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=jxEYmWYVPZHXGs0pzml6CQzRmWfJZmzs5PlDGJqc8 gM=; b=UgHh25dzV6arsRt416w55ZC5GqZfv8bHD8RKkbpgcBsHfnhZ7okC1+RNw /Iie2mn6FgsspY9G4zq6wG3Vn+JPFGbnymqSvTQ5SLS/+HPFtWDhw0eHFfg1ZlTn rH2kdwDJ1H5v7wyXpzVsRVCwTxM7Qowg97w8Dm5PUa/a2uXDeTJ0S9N43VkozqMc T6wVnuOeF6hYmQ6OUSJoJoLSCGTATXiOiZhuvUBPXSc8yxmtvfgUnBGu+cmsqbgT YJ86hT3Hk11SrEl+0JPbjRUI37XCRki2HVgCoIpinOG163QmzWOOZZFPsXpgtMEq RTmIubVB+FF0p5Jh22M5NDyWBdhOw== 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 2BB4F102A0; Sun, 25 Nov 2018 07:28:51 -0500 (EST) From: Thomas Monjalon To: "Stojaczyk, Dariusz" Cc: dev@dpdk.org, "Zhang, Qi Z" Date: Sun, 25 Nov 2018 13:28:50 +0100 Message-ID: <9706776.xTluRg8pfR@xps> In-Reply-To: <039ED4275CED7440929022BC67E70611532EA1B2@SHSMSX103.ccr.corp.intel.com> References: <20181123145824.95786-1-dariusz.stojaczyk@intel.com> <039ED4275CED7440929022BC67E70611532EA1B2@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] dev: don't fail the hotplug request if device is attached in secondary 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, 25 Nov 2018 12:28:52 -0000 > > Consider the following scenario: > > > > 1) primary process (A) starts, probes the bus > > 2) a secondary process (B) starts, probes the bus > > 3) yet another secondary process (C) starts > > 4) (C) registers the pci driver and hotplugs the device > > * an IPC attach req is sent to the primary (A) > > * (A) ignores the -EEXIST from process-local probe > > * (A) propagates the request to all secondary processes > > * (B) responds with -EEXIST > > * (A) replies to the original request with the -EEXIST > > return code > > * the -EEXIST is returned back to the user, although the > > device was successfully attached both locally and in > > all other processes > > > > This patch makes the primary process reply with rc=0 even if there was another > > secondary process with the device already attached. The primary process > > already didn't reply with -EEXIST when the device was attached locally, so now > > this behavior is even more consistent. Looking by the code, this seems to be the > > originally intended behavior. > > > > Fixes: ac9e4a17370f ("eal: support attach/detach shared device from > > secondary") > > Cc: qi.z.zhang@intel.com > > > > Signed-off-by: Darek Stojaczyk > > Acked-by: Qi Zhang Applied, thanks