[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2 of 4 V5] tools/libxl: Remus network buffering - hotplug scripts and setup code
On Mon, Nov 25, 2013 at 9:32 AM, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> wrote: Shriram Rajagopalan writes ("[PATCH 2 of 4 V5] tools/libxl: Remus network buffering - hotplug scripts and setup code"): The idea here is that if the interface has a name, then we use it. Otherwise, we simply revert to the name that Xen assigns it - which is in vifX.Y format.
But I agree with you that the vifname reading process from xenstore may not be successful always. ... Not according to the documentation. Its return value is either the name of the qdisc or NULL if its not set. There is no mention of errno.
I can only go by whats documented :).
You asked this question before (in a previous version). There is a cleanup code that gets called that releases these resources (the teardown function).
It is also documented in the script.
I looked at them before deciding to roll out my own. Please correct me if I am wrong about this: The ao_device interface while sharing some similarities, does not really fit in here.
It attempts bring up/down a device (that has been created already, for e.g., a vif), add it to the guest and represent it internally using libxl__device or something. The netbuf code invokes the script, which in turn sets up an IFB device that is not
part of the guest's configuration. The information about the device returned by the script is collected in an internal data structure and new handles (plug qdisc handle) are created, and added to remus' state.
The control flows are different. The only commonality is invoke external script, wait until it finishes and invoke callback. On alternative is to hack into the device_hotplug code, and add special cases. For e.g.,
if device_ptr is null, then this is a remus op, so do Y instead of X. This kind of special casing would percolate throughout the device hotplug code, polluting a what was otherwise cleanly defined interface to handle generic device hotplug.
If you have any other alternatives in mind, I would be happy to check it out.
Yep. See my answer above.
They are not constants taken from any library and stuck in here. They are merely for readability. The related code is remus_netbuffer_op, where you would find the buffer/release code blocks controlled through the value of op variable
(which is either BUFFER_START or BUFFER_RELEASE) thanks shriram _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |