From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH 18.05-RC3 2/2] net/virtio-user: support memory hotplug Date: Mon, 14 May 2018 09:29:46 +0100 Message-ID: References: <20180508071045.105475-1-xiao.w.wang@intel.com> <20180508071045.105475-3-xiao.w.wang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, tiwei.bie@intel.com To: Xiao Wang , maxime.coquelin@redhat.com Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id B63F01BC2B for ; Mon, 14 May 2018 10:29:49 +0200 (CEST) In-Reply-To: <20180508071045.105475-3-xiao.w.wang@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 08-May-18 8:10 AM, Xiao Wang wrote: > From: Maxime Coquelin > > When memory is hot-added or hot-removed, the virtio-user driver has to > notify the vhost-user backend with sending a VHOST_USER_SET_MEM_TABLE > request with the new memory map as payload. > > This patch implements and registers a mem_event callback, it pauses the > datapath and updates memory regions to vhost in case of hot-add or > hot-remove event. This memory region update has only to be done when the > device is already started, so a new status flag is added to the device to > keep track of the status. > > As the device can now be managed by different threads, a mutex is > introduced to protect against concurrent device configuration. > > Signed-off-by: Maxime Coquelin > Signed-off-by: Xiao Wang > --- Memory part looks OK to me. -- Thanks, Anatoly