[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxl/netbsd: check num_exec in hotplug function
Also CC Roger since he authored the original code. Feel free to correct me misunderstanding on this issue. On Mon, Jul 04, 2016 at 12:09:30PM +0100, Wei Liu wrote: > Add back xen-devel. Please reply to all recipients in the future. > > On Mon, Jul 04, 2016 at 01:11:04AM -0700, John Nemeth wrote: > > On Jul 2, 12:35pm, Wei Liu wrote: > > } > > } This basically replicates the same logic in libxl_linux.c. Without this > > } libxl will loop indefinitely trying to execute hotplug script. > > > > One minor change required (see below). > > > > } Reported-by: John Nemeth <jnemeth@xxxxxxxxx> > > } Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> > > } --- > > } tools/libxl/libxl_netbsd.c | 18 ++++++++++++++++++ > > } 1 file changed, 18 insertions(+) > > } > > } diff --git a/tools/libxl/libxl_netbsd.c b/tools/libxl/libxl_netbsd.c > > } index 096c057..92d3c89 100644 > > } --- a/tools/libxl/libxl_netbsd.c > > } +++ b/tools/libxl/libxl_netbsd.c > > } @@ -68,7 +68,25 @@ int libxl__get_hotplug_script_info(libxl__gc *gc, > > libxl__device *dev, > > } > > } switch (dev->backend_kind) { > > } case LIBXL__DEVICE_KIND_VBD: > > } + if (num_exec != 0) { > > } + LOG(DEBUG, "num_exec %d, not running hotplug scripts", > > num_exec); > > } + rc = 0; > > } + goto out; > > } + } > > } + rc = libxl__hotplug(gc, dev, args, action); > > } + if (!rc) rc = 1; > > } + break; > > } case LIBXL__DEVICE_KIND_VIF: > > } + /* > > } + * If domain has a stubdom we don't have to execute hotplug > > scripts > > } + * for emulated interfaces > > } + */ > > } + if ((num_exec > 1) || > > > > The function is called with num_exec set to 0 and 1, so this > > should be: > > > > if ((num_exec != 0) || > > > > AIUI this is related to how network is setup because we would need to > hotplug both the emulated nic in QEMU and the PV nic. Is this line > causing problem for you? > > Wei. > > > } + (libxl_get_stubdom_id(CTX, dev->domid) && num_exec)) { > > } + LOG(DEBUG, "num_exec %d, not running hotplug scripts", > > num_exec); > > } + rc = 0; > > } + goto out; > > } + } > > } rc = libxl__hotplug(gc, dev, args, action); > > } if (!rc) rc = 1; > > } break; > > } -- > > } 2.1.4 > > } > > }-- End of excerpt from Wei Liu _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |