From: Ian Campbell Subject: Re: [PATCH v11 09/17] libxl: set nic type of stub to PV instead of copying from the parent Date: Tue, 24 Jul 2012 16:32:13 +0100 Message-ID: <1343143933.18971.40.camel@zakaz.uk.xensource.com> References: <1343064465-17864-1-git-send-email-roger.pau@citrix.com> <1343064465-17864-10-git-send-email-roger.pau@citrix.com> <20494.48841.830761.344513@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20494.48841.830761.344513@mariner.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 Jackson Cc: "xen-devel@lists.xen.org" , Roger Pau Monne List-Id: xen-devel@lists.xenproject.org On Tue, 2012-07-24 at 16:27 +0100, Ian Jackson wrote: > Roger Pau Monne writes ("[PATCH v11 09/17] libxl: set nic type of stub to PV instead of copying from the parent"): > > +{ > > + const libxl_domain_build_info *b_info = &guest_config->b_info; > > + int i; > > + > > + if (b_info->type != LIBXL_DOMAIN_TYPE_HVM) > > + return ERROR_INVAL; > > + > > + for (i = 0; i < guest_config->num_nics; i++) { > > + libxl_device_nic_init(&nic[i]); > > + memcpy(&nic[i], &guest_config->nics[i], sizeof(nic[i])); > > + nic[i].nictype = LIBXL_NIC_TYPE_VIF; > > + nic[i].backend_domid = 0; > > As discussed, this should not be hardcoded to 0. Nor should the devid which was the next line which you trimmed: > > + nic[i].devid = 0; Ian.