From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH v3 4/4] libxl: add support for vscsi Date: Wed, 11 Mar 2015 17:02:13 +0100 Message-ID: <20150311160213.GA3063@aepfle.de> References: <1425635156-2357-1-git-send-email-olaf@aepfle.de> <1425635156-2357-5-git-send-email-olaf@aepfle.de> <1426088006.21353.282.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1426088006.21353.282.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 Liu , Stefano Stabellini , Ian Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, Mar 11, Ian Campbell wrote: > On Fri, 2015-03-06 at 10:45 +0100, Olaf Hering wrote: > > +void libxl_device_vscsi_append_dev(libxl_ctx *ctx, libxl_device_vscsi *hst, > > + libxl_vscsi_dev *dev); > > +int libxl_device_vscsi_get_host(libxl_ctx *ctx, > > + uint32_t domid, > > + const char *cfg, > > + libxl_device_vscsi **vscsi_host); > What do these two non-standard functions do? > > In general the caller would be expected to provide a libxl_device_vscsi, > which will be filled in, rather than having the function allocate one. > > > +int libxl_device_vscsi_parse(libxl_ctx *ctx, const char *cfg, > > + libxl_device_vscsi *vscsi_host, > > + libxl_vscsi_dev *vscsi_dev); > > Like with disk, this is xend/xl specific but might be of use to other > toolstacks, therefore it belongs in libxlu not in libxl proper. > (this might apply to get_host too, depending on what it does) libvirt for example will do the very same what xl currently does. But so far I did not get to libvirt yet. The interface is not finished yet. Last time I looked at libxl vs. libxlu it introduced a circular dependency. Thats why all the simple string parsing is in libxl itself. But I will double check if the current layout allows a split. Basically I tried to simplify things for the caller and have all the functionality in libxl before libxl_device_vscsi is passed to libxl_device_vscsi_{add,remove). I will address the other comments as well in the next round. Olaf