[libvirt] [PATCH] libxl: Fix devid init in libxlMakeNicList

Ian Campbell Ian.Campbell at citrix.com
Wed Jan 8 12:26:22 UTC 2014

On Wed, 2014-01-08 at 12:20 +0100, Stefan Bader wrote:
> On 08.01.2014 11:42, Ian Campbell wrote:
> > On Wed, 2014-01-08 at 11:39 +0100, Stefan Bader wrote:
> >> This basically reverts commit ba64b97134a6129a48684f22f31be92c3b6eef96
> >> "libxl: Allow libxl to set NIC devid". However assigning devid's
> >> before calling libxlMakeNic does not work as that is calling
> >> libxl_device_nic_init which sets it back to -1.
> >> Right now auto-assignment only works in the hotplug case. But even if
> >> that would be fixed at some point (if that is possible at all),
> > 
> > I think it should be -- any chance you could prepare a patch to libxl as
> > well?
> Not sure that is that simple. At least not in libxl_device_nic_init. The way I
> understand this is done does not seem to allow a good solution. Creation looks
> to allow initializing NIC definitions in some array that is not connected to a
> specific domain, yet.

Right, I think I previously concluded that for the domain create case
this could be done in initiate_domain_create, with the hotplug case
handled via the existing code in libxl_device_nic_add.

> I suppose what I could come up with is the kind of modification I was proposing
> in one of those emails last year (sounds like an awful long time :)). So at the
> point where the device-model is about to get started and the code already loops
> over the NIC definitions. That won't give the libvirt path default devid's but
> any other user that has not done yet.
> -Stefan

More information about the libvir-list mailing list