From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2018 05:35:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,338,1526367600"; d="scan'208";a="71419931" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.237.220.102]) ([10.237.220.102]) by fmsmga001.fm.intel.com with ESMTP; 11 Jul 2018 05:34:48 -0700 To: Qi Zhang , thomas@monjalon.net 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 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> From: "Burakov, Anatoly" Message-ID: <6540e3cb-5048-5d60-ce14-e4705a57548c@intel.com> Date: Wed, 11 Jul 2018 13:34:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 MIME-Version: 1.0 In-Reply-To: <20180711030917.181098-6-qi.z.zhang@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v11 05/19] eal: enable hotplug on multi-process 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: Wed, 11 Jul 2018 12:35:03 -0000 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