From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Subject: Re: [PATCH 1/4] libxl: set the device model version earlier in xenstore Date: Fri, 8 Apr 2016 16:16:19 +0200 Message-ID: References: <1460051129-20817-1-git-send-email-roger.pau@citrix.com> <1460051129-20817-2-git-send-email-roger.pau@citrix.com> <20160408131439.GH32191@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0-614727174-1460124981=:18723" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoXEd-0008RT-BE for xen-devel@lists.xenproject.org; Fri, 08 Apr 2016 14:18:07 +0000 In-Reply-To: <20160408131439.GH32191@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Wei Liu Cc: xen-devel@lists.xenproject.org, Ian Jackson , Roger Pau Monne List-Id: xen-devel@lists.xenproject.org --0-614727174-1460124981=:18723 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT On Fri, 8 Apr 2016, Wei Liu wrote: > On Thu, Apr 07, 2016 at 07:45:26PM +0200, Roger Pau Monne wrote: > > So libxl doesn't have to pass the build info around just to get the device > > model used by the guest. This allows to simplify > > libxl__device_nic_setdefault. > > > > Signed-off-by: Roger Pau Monné > > Cc: Ian Jackson > > Cc: Wei Liu > > I have some reservation on this approach. I would rather passing around > a struct than accessing xenstore. The latter is much more expensive. Sorry, my commit log wasn't very clear. The struct can't always be passed around, since it's only available at domain creation time, so we also need to xenstore way for hotplug. Due to that, I think it's simpler to always use it, instead of having two different approaches depending on whether the build info struct is provided or not. TBH, this is only one xenstore read, so I would rather prefer to do it always this way in order to have simpler code. Roger. --0-614727174-1460124981=:18723 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --0-614727174-1460124981=:18723--