From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yang Hongyang Subject: Re: [PATCH v4 --for 4.6 COLOPre 05/25] libxl/remus: introduce libxl__remus_setup Date: Thu, 16 Jul 2015 13:32:23 +0800 Message-ID: <55A741E7.9020109@cn.fujitsu.com> References: <1436946351-21118-1-git-send-email-yanghy@cn.fujitsu.com> <1436946351-21118-6-git-send-email-yanghy@cn.fujitsu.com> <1436959569.32371.12.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1436959569.32371.12.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: wei.liu2@citrix.com, wency@cn.fujitsu.com, andrew.cooper3@citrix.com, yunhong.jiang@intel.com, eddie.dong@intel.com, xen-devel@lists.xen.org, guijianfeng@cn.fujitsu.com, rshriram@cs.ubc.ca, Ian Jackson List-Id: xen-devel@lists.xenproject.org On 07/15/2015 07:26 PM, Ian Campbell wrote: > On Wed, 2015-07-15 at 15:45 +0800, Yang Hongyang wrote: >> Refactoring Remus setup by introducing libxl__remus_setup API. >> All Remus setup work are done in this function. >> >> Also remove the libxl__ prefix for static functions. > > There is a subtle behavioural change here, which is that if anything > which is now done in _setup fails then the result is a call to > dss->callback( ..,..,ERROR_FAIL) rather than _start returning > AO_CREATE_FAIL(ERROR_FAIL). > > I think this is probably a reasonable and correct change, but I think it > is worth mentioning in the commit log. Yes, will update the commit log. > > That said, I also wonder if the actual check for netbuffer_enabled (the > only such failure in practice) ought to be moved up such that it stays > in _start along with the other similar checks, i.e. _start would do: > > if (libxl_defbool_val(info->netbuf) && !libxl__netbuffer_enabled(gc)) { > LOG(ERROR, "Remus: No support for network buffering"); > rc = ERROR_FAIL; > goto out; > } This check is for Remus only, we want to reuse _start for COLO, so anything related to Remus only should sit in libxl_remus.c. > > while _setup would do: > > if (libxl_defbool_val(info->netbuf)) { > // MAYBE : assert(libxl__netbuffer_enabled(gc)) > rds->device_kind_flags |= (1 << LIBXL__DEVICE_KIND_VIF); > } > > Ian. > > . > -- Thanks, Yang.