From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2018 01:29:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,399,1520924400"; d="scan'208";a="54948057" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.252.6.248]) ([10.252.6.248]) by fmsmga001.fm.intel.com with ESMTP; 14 May 2018 01:29:47 -0700 To: Xiao Wang , maxime.coquelin@redhat.com Cc: dev@dpdk.org, tiwei.bie@intel.com References: <20180508071045.105475-1-xiao.w.wang@intel.com> <20180508071045.105475-3-xiao.w.wang@intel.com> From: "Burakov, Anatoly" Message-ID: Date: Mon, 14 May 2018 09:29:46 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180508071045.105475-3-xiao.w.wang@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 18.05-RC3 2/2] net/virtio-user: support memory hotplug 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: Mon, 14 May 2018 08:29:50 -0000 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