All of lore.kernel.org
 help / color / mirror / Atom feed
* xl remus - Invoking scripts from xl
@ 2013-07-14 15:13 Shriram Rajagopalan
  2013-07-17 13:57 ` Ian Campbell
  0 siblings, 1 reply; 11+ messages in thread
From: Shriram Rajagopalan @ 2013-07-14 15:13 UTC (permalink / raw)
  To: xen-devel@lists.xen.org, Ian Campbell, Ian Jackson


[-- Attachment #1.1: Type: text/plain, Size: 1842 bytes --]

I was investigating adding network buffering support to xl Remus.
I need
 1) setup an ifb device and some traffic shaping rules (packet redirection)
 2) control the release of buffer every checkpoint.
For the latter, i have managed to push c API support for Remus network
buffer to libnl and the associated Remus network buffer module (sch_plug)
into mainline kernel (3.4 onwards).

However, setting up the buffer itself still requires scripting support
because there is no proper C API to do this setup from xl.
 For eg, xl invokes a script with domain name or vif name the script does
the following:

"modprobe ifb"

bring up an ifb device
"ip link set ifb0 up"

add ingress qdisc to each vif
"tc qdisc add dev vif1.0 ingress"

redirect traffic from vifs to ifb devices
"tc filter add dev vif1.0 parent ffff: proto ip pref 10 u32 match u32 0 0
action mirred egress redirect dev ifb0"

Communicate the ifb device associated with each vif back to xl.

Later, xl would add "plug qdisc" to ifb0 and control buffering via c API
available from libnl.

Is there a general convention in the xl code base with respect to invoking
external scripts and reading their output back into xl ?

I checked the hotplug script implementation. While there is a reference
point to external script invocation, hotplug script results are
communicated back to xl using xenstore, -- standard xenstore entries.


I can use xenstore too but I don't want to pollute xenstore entries unless
absolutely necessary.

Or is it as simple as reading and writing to files or using standard
communication primitives like named fifos or pipes ?

As an alternative,
Instead of adding libnl dependency to xl,
I can reuse existing python code for network buffering and control the
python process via unix sockets or pipes or fifos. The python code does not
rely on libnl.

Shriram

[-- Attachment #1.2: Type: text/html, Size: 2499 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-07-19  9:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-14 15:13 xl remus - Invoking scripts from xl Shriram Rajagopalan
2013-07-17 13:57 ` Ian Campbell
2013-07-17 16:39   ` Shriram Rajagopalan
2013-07-18 10:53     ` George Dunlap
2013-07-18 11:10       ` Ian Campbell
2013-07-18 13:26         ` Shriram Rajagopalan
2013-07-18 13:33           ` Ian Campbell
2013-07-18 14:51             ` Shriram Rajagopalan
2013-07-18 15:02               ` George Dunlap
2013-07-18 17:40                 ` Shriram Rajagopalan
2013-07-19  9:02               ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.