From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH v11 05/19] eal: enable hotplug on multi-process Date: Wed, 11 Jul 2018 13:34:47 +0100 Message-ID: <6540e3cb-5048-5d60-ce14-e4705a57548c@intel.com> References: <20180607123849.14439-1-qi.z.zhang@intel.com> <20180711030917.181098-1-qi.z.zhang@intel.com> <20180711030917.181098-6-qi.z.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: konstantin.ananyev@intel.com, dev@dpdk.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, benjamin.h.shelton@intel.com, narender.vangati@intel.com To: Qi Zhang , thomas@monjalon.net Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 5F6CD1B564 for ; Wed, 11 Jul 2018 14:35:03 +0200 (CEST) In-Reply-To: <20180711030917.181098-6-qi.z.zhang@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 11-Jul-18 4:09 AM, Qi Zhang wrote: > We are going to introduce the solution to handle hotplug in > multi-process, it includes the below scenario: > > 1. Attach a device from the primary > 2. Detach a device from the primary > 3. Attach a device from a secondary > 4. Detach a device from a secondary > > In the primary-secondary process model, we assume devices are shared > by default. that means attaches or detaches a device on any process > will broadcast to all other processes through mp channel then device > information will be synchronized on all processes. > > Any failure during attaching/detaching process will cause inconsistent > status between processes, so proper rollback action should be considered. > > This patch covers the implementation of case 1,2. > Case 3,4 will be implemented on a separate patch. > > IPC scenario for Case 1, 2: > > attach a device > a) primary attach the new device if failed goto h). > b) primary send attach sync request to all secondary. > c) secondary receive request and attach the device and send a reply. > d) primary check the reply if all success goes to i). > e) primary send attach rollback sync request to all secondary. > f) secondary receive the request and detach the device and send a reply. > g) primary receive the reply and detach device as rollback action. > h) attach fail > i) attach success > > detach a device > a) primary send detach sync request to all secondary > b) secondary detach the device and send reply > c) primary check the reply if all success goes to f). > d) primary send detach rollback sync request to all secondary. > e) secondary receive the request and attach back device. goto g) > f) primary detach the device if success goto g), else goto d) > g) detach fail. > h) detach success. > > Signed-off-by: Qi Zhang > --- Multiprocess part looks OK to me, so Acked-by: Anatoly Burakov -- Thanks, Anatoly