[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 4/5] libxl: call hotplug scripts from libxl for vif



Roger Pau Monne writes ("[Xen-devel] [PATCH v3 4/5] libxl: call hotplug scripts 
from libxl for vif"):
> As the previous change already introduces most of needed machinery to call
> hotplug scripts from libxl, this only adds the necessary bits to call this
> scripts for vif interfaces also.

I have read this only cursorily, given my comments on the previous
patch, but:

> +    char *ifname = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, "%s/%s",
> +                                                                   be_path,
> +                                                                   
> "vifname"));

Probably all of these functions need to take a xenstore transaction to
deal with concurrency properly.

You need to avoid assuming that NULL from libxl__xs_* means what you
think it means.  It might be better to invent a new wrapper which you
could use like this
    rc = libxl__xs_read_that_actually_works(gc, trans, path, &result);
    if (rc) goto out;
    if (!result) {
        /* code for if thing doesn't exist */
    }

GCSPRINTF might avoid the weird wrapping.

> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> index 5cf9708..0b2c832 100644
> --- a/tools/libxl/libxl_types.idl
> +++ b/tools/libxl/libxl_types.idl
> @@ -343,6 +343,7 @@ libxl_device_nic = Struct("device_nic", [
>      ("ifname", string),
>      ("script", string),
>      ("nictype", libxl_nic_type),
> +    ("disable_xl_vif_script", integer),
>      ])

We shouldn't have config options of the form "disable_...".  They
should all be phrased as "enable" or in this case "run".  And I'm not
convinced by "xl", but since there isn't any patch to the xl domain
configuration doc for this new option I'm not sure.  Of course
documentation is needed...

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.