From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] dev: don't fail the hotplug request if device is attached in secondary Date: Sun, 25 Nov 2018 13:28:50 +0100 Message-ID: <9706776.xTluRg8pfR@xps> References: <20181123145824.95786-1-dariusz.stojaczyk@intel.com> <039ED4275CED7440929022BC67E70611532EA1B2@SHSMSX103.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, "Zhang, Qi Z" To: "Stojaczyk, Dariusz" 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) In-Reply-To: <039ED4275CED7440929022BC67E70611532EA1B2@SHSMSX103.ccr.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > > 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