From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Pau Monne Subject: Re: [PATCH v6 10/13] libxl: set nic type to VIF by default Date: Thu, 28 Jun 2012 14:29:29 +0100 Message-ID: <4FEC5C39.4080606@citrix.com> References: <1339676475-33265-1-git-send-email-roger.pau@citrix.com> <1339676475-33265-11-git-send-email-roger.pau@citrix.com> <20452.22966.110320.601890@mariner.uk.xensource.com> <4FE9E153.1050309@citrix.com> <20120626165808.GC2058@reaktio.net> <1340787043.29172.10.camel@zakaz.uk.xensource.com> <4FEC2248.4080005@citrix.com> <1340875618.10942.14.camel@zakaz.uk.xensource.com> <4FEC26C2.6070901@citrix.com> <1340877257.10942.21.camel@zakaz.uk.xensource.com> <4FEC2CD9.3070007@citrix.com> <1340878212.10942.30.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1340878212.10942.30.camel@zakaz.uk.xensource.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: Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Ian Campbell wrote: > On Thu, 2012-06-28 at 11:07 +0100, Roger Pau Monne wrote: >> Ian Campbell wrote: >>> On Thu, 2012-06-28 at 10:41 +0100, Roger Pau Monne wrote: >>>> I think the most suitable place is >>>> libxl_create.c:initiate_domain_create, which also sets the defaults for >>>> disk devices, >>> .. by calling setdefaults though. >> Yes, sorry. >> >>> I'd like to keep all such logic in setdefaults as far as possible. >>> >>> libxl__devic_nic_setdefautls is an internal function so we can add >>> either a domid or type parameter quite easily. Are there any callsites >>> which would be unable to provide one or the other of those? >>> >>> Probably domid is best, with setdefaults calling libxl__domain_type as >>> necessary. >> I think it would be appropriate to pass domid to every setdefault >> function, even if it's only used by nic now: >> >> libxl__device_disk_setdefault >> libxl__device_nic_setdefault >> libxl__device_vfb_setdefault >> libxl__device_vkb_setdefault >> libxl__device_pci_setdefault >> >> To keep the symmetry, are you ok with that? > > Lets make that cleanup in 4.3 and just do the necessary for 4.2. Ok, I've just changed libxl__device_nic_setdefault to take a domid parameter.