Re: [libvirt] make docs fails on EL5

2011-11-17 Thread Daniel Berteaud
Le mercredi 16 novembre 2011 à 09:12 +0100, Daniel Berteaud a écrit : Le mercredi 16 novembre 2011 à 11:57 +0800, Osier Yang a écrit : 于 2011年11月16日 11:12, shu ming 写道: It seems tit is he same issue as the thread below, the docs can not be generated in some Linux distros. It may be

Re: [libvirt] bug: try to take disk snapshot for LVM2 Volume

2011-11-17 Thread shu ming
Checking the source of the disk will exclude the case when the source disk is block device while the snapshot target is given manually by the users with snapshot-create --xmlfile or virsh snapshot-create-as --diskspec. Why not check the snapshot directory where it will be created? On

[libvirt] [PATCHv2 06/11] add VIR_DOMAIN_NUMATUNE_MEM_NONE

2011-11-17 Thread Hu Tao
add VIR_DOMAIN_NUMATUNE_MEM_NONE to represent none of the numatune modes is set --- src/conf/domain_conf.c |1 + src/conf/domain_conf.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 71eb209..6150b10 100644 ---

[libvirt] [PATCHv2 10/11] Implement virDomain{G, S}etNumaParameters for the qemu driver

2011-11-17 Thread Hu Tao
--- src/qemu/qemu_driver.c | 399 1 files changed, 399 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 5f4a18d..5b6398c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -94,6

[libvirt] [PATCHv2 01/11] don't modify CPU set string in virDomainCpuSetParse

2011-11-17 Thread Hu Tao
As the function only parses the CPU set string, there is no good reason to modify it. --- src/conf/domain_conf.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6b78d97..71eb209 100644 --- a/src/conf/domain_conf.c +++

[libvirt] [PATCHv2 05/11] use cpuset to manage numa

2011-11-17 Thread Hu Tao
This patch deprecates libnuma and uses cpuset to manage numa. We can further add a `numatune' command to adjust numa parameters through cpuset. --- src/qemu/qemu_cgroup.c | 73 1 files changed, 73 insertions(+), 0 deletions(-) diff --git

[libvirt] [PATCHv2 02/11] enable cgroup cpuset by default

2011-11-17 Thread Hu Tao
This prepares for subsequent patches which introduce dependence on cgroup cpuset. Enable cgroup cpuset by default so users don't have to modify configuration file before encountering a cpuset error. --- src/qemu/qemu.conf |5 +++-- src/qemu/qemu_conf.c |3 ++- 2 files changed, 5

[libvirt] [PATCHv2 03/11] Add functions to set/get cgroup cpuset parameters

2011-11-17 Thread Hu Tao
--- src/libvirt_private.syms | 10 src/util/cgroup.c| 112 ++ src/util/cgroup.h| 11 + 3 files changed, 133 insertions(+), 0 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index

[libvirt] [PATCHv2 11/11] add new command numatune to virsh

2011-11-17 Thread Hu Tao
add new command numatune to virsh to get/set numa parameters --- tools/virsh.c | 180 + 1 files changed, 180 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 89fb4e7..3dfa375 100644 --- a/tools/virsh.c +++

[libvirt] [RFC][PATCHv2 00/11] add numatune command

2011-11-17 Thread Hu Tao
This series does mainly two things: 1. use cgroup cpuset to manage numa parameters 2. add a virsh command numatune to allow user to change numa parameters from command line Current numa parameters include nodeset and mode, but these cgroup cpuset provides don't completely match with

[libvirt] [PATCHv2 04/11] introduce numa backend

2011-11-17 Thread Hu Tao
Currently we are using libnuma to set up numa, but it's desired to use cgroup cpuset to do the job instead. But for old systems that don't have cgroup cpuset, we fall back to libnuma. --- src/conf/domain_conf.h |8 src/qemu/qemu_process.c | 11 --- 2 files changed, 16

[libvirt] [PATCHv2 09/11] Add virDomain{G, S}etNumaParameters support to the remote driver

2011-11-17 Thread Hu Tao
--- daemon/remote.c | 64 ++ src/remote/remote_driver.c | 50 src/remote/remote_protocol.x | 25 +++- src/remote_protocol-structs | 16 ++ 4 files changed, 154 insertions(+), 1

Re: [libvirt] [PATCH 0/2] Fix build with polkit0

2011-11-17 Thread Daniel P. Berrange
On Wed, Nov 16, 2011 at 11:46:27AM -0700, Jim Fehlig wrote: Commit 0f590c62 was not the proper fix for polkit0 build issue. This series reverts 0f590c62 and adds virNetServerGetDBusConn() to libvirt_private.syms Jim Fehlig (2): Revert commit 0f590c62 Fix build with polkit0

[libvirt] [PATCHv2 08/11] Implement main entries of virDomain{G, S}etNumaParameters

2011-11-17 Thread Hu Tao
--- src/libvirt.c | 113 + 1 files changed, 113 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 1518ed2..4eaf297 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -3762,6 +3762,119 @@ error: } /** + *

[libvirt] [PATCHv2 07/11] add new API virDomain{G, S}etNumaParameters

2011-11-17 Thread Hu Tao
Set up the types for the numa functions and insert them into the virDriver structure definition. --- include/libvirt/libvirt.h.in | 23 +++ python/generator.py |2 ++ src/driver.h | 15 +++ src/libvirt_public.syms |6 ++

Re: [libvirt] [PATCH 02/16] Rename and split the macvtap.c file

2011-11-17 Thread Daniel P. Berrange
On Thu, Nov 17, 2011 at 05:49:10AM -0500, Laine Stump wrote: On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Rename the macvtap.c file to virnetdevmacvlan.c to reflect its functionality. Move the port profile association code out into

Re: [libvirt] [PATCH 02/16] Rename and split the macvtap.c file

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Rename the macvtap.c file to virnetdevmacvlan.c to reflect its functionality. Move the port profile association code out into virnetdevvportprofile.c. Make the APIs available unconditionally to callers

Re: [libvirt] [PATCH 01/16] Rename Macvtap management APIs

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com In preparation for code re-organization, rename the Macvtap management APIs to have the following patterns virNetDevMacVLanX - macvlan/macvtap interface management

Re: [libvirt] [PATCH 05/16] Move the low level macvlan creation APIs

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Move the low level macvlan creation APIs into the virnetdevmacvlan.c file where they more naturally belong * util/interface.c, util/interface.h: Remove virNetDevMacVLanCreate and

Re: [libvirt] [PATCH 04/16] Rename low level macvlan creation APIs

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Rename ifaceMacvtapLinkAdd to virNetDevMacVLanCreate and ifaceLinkDel to virNetDevMacVLanDelete. Strictly speaking the latter isn't restricted to macvlan devices, but that's the only use libvirt has

Re: [libvirt] [PATCH 06/16] Rename interface MAC address replacement APIs

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Rename ifaceReplaceMacAddress to virNetDevReplaceMacAddress and ifaceRestoreMacAddress to virNetDevRestoreMacAddress. * util/interface.c, util/interface.h, util/virnetdevmacvlan.c: Rename APIs ---

Re: [libvirt] [PATCH 07/16] Move MAC address replacement functions to virnetdev.c

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: Move virNetDevReplaceMacAddress and virNetDevRestoreMacAddress to the virnetdev.c file where they naturally belong * util/interface.c, util/interface.h: Remove virNetDevReplaceMacAddress and virNetDevRestoreMacAddress * util/virnetdev.c,

Re: [libvirt] [PATCH 04/16] Rename low level macvlan creation APIs

2011-11-17 Thread Daniel P. Berrange
On Thu, Nov 17, 2011 at 06:04:32AM -0500, Laine Stump wrote: On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Rename ifaceMacvtapLinkAdd to virNetDevMacVLanCreate and ifaceLinkDel to virNetDevMacVLanDelete. Strictly speaking the latter isn't

Re: [libvirt] [RFC][PATCHv2 00/11] add numatune command

2011-11-17 Thread Osier Yang
于 2011年11月17日 17:44, Hu Tao 写道: This series does mainly two things: 1. use cgroup cpuset to manage numa parameters 2. add a virsh command numatune to allow user to change numa parameters from command line Current numa parameters include nodeset and mode, but these cgroup cpuset

Re: [libvirt] Upgrade-problems from qemu-0.14.1 + libvirt-0.8.4 to qemu-0.15.1 + libvirt-0.9.6: Why I think multifunction=on is a bad idea...

2011-11-17 Thread Philipp Hahn
Hello Eric, Am Dienstag 15 November 2011 22:33:20 schrieb Eric Blake: Is there a way to select which ROM image qemu uses from the qemu command line? The file names are explicitly added to the qemu command-line: qemu:commandline qemu:arg value='-option-rom'/ qemu:arg

Re: [libvirt] [PATCH 10/16] Rename ifaceGetIPAddress to virNetDevGetIPv4Address

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com To match up with the existing virNetDevSetIPv4Address, rename ifaceGetIPAddress to virNetDevGetIPv4Address * util/interface.h, util/interface.c: Rename API * network/bridge_driver.c: Update for API

Re: [libvirt] [PATCH 09/16] Move virNetDevGetIndex virNetDevGetVLanID to virnetdev.c

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Move virNetDevGetIndex virNetDevGetVLanID to virnetdev.c to suit their functional purpose * util/interface.c, util/interface.h: Remove virNetDevGetIndex virNetDevGetVLanID * util/virnetdev.c,

Re: [libvirt] [PATCH 13/16] Move virNetDevValidateConfig to virnetdev.c

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: * src/util/interface.c, src/util/interface.h: Remove virNetDevValidateConfig * src/util/virnetdev.c, src/util/virnetdev.h: Add virNetDevValidateConfig --- src/util/interface.c | 89 --

Re: [libvirt] [PATCH 11/16] Move virNetDevGetIPv4Address to virnetdev.c

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: Move the virNetDevGetIPv4Address function to virnetdev.c * util/interface.c, util/interface.h: Remove virNetDevGetIPv4Address * util/virnetdev.c, util/virnetdev.h: Add virNetDevGetIPv4Address --- src/util/interface.c | 63

Re: [libvirt] [PATCH 16/16] Move ifaceMacvtapLinkDump and ifaceGetNthParent functions

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: Move the ifaceMacvtapLinkDump and ifaceGetNthParent functions into virnetdevvportprofile.c since they are specific to that code. This avoids polluting the headers with the Linux specific netlink data types * src/util/interface.c,

Re: [libvirt] [PATCH 14/16] Rename APIs for dealing with virtual/physical functions

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: Rename ifaceIsVirtualFunction to virNetDevIsVirtualFunction, ifaceGetVirtualFunctionIndex to virNetDevGetVirtualFunctionIndex and ifaceGetPhysicalFunction to virNetDevGetPhysicalFunction * src/util/interface.c, src/util/interface.h: Rename APIs

Re: [libvirt] [PATCH 08/16] Rename ifaceGetIndex and ifaceGetVLAN

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: From: Daniel P. Berrangeberra...@redhat.com Rename the ifaceGetIndex method to virNetDevGetIndex and ifaceGetVlanID to virNetDevGetVLanID. Also change the error reporting behaviour to always raise errors and return -1 on failure *

Re: [libvirt] [PATCH 12/16] Rename ifaceCheck to virNetDevValidateConfig

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: Rename the ifaceCheck method to virNetDevValidateConfig and change so that it always raises an error and returns -1 on error. * src/util/interface.c, src/util/interface.h: Rename ifaceCheck to virNetDevValidateConfig *

Re: [libvirt] [PATCH 15/16] Move functions for dealing with physical/virtual devices

2011-11-17 Thread Laine Stump
On 11/15/2011 06:14 AM, Daniel P. Berrange wrote: Move virNetDevIsVirtualFunction, virNetDevGetVirtualFunctionIndex and virNetDevGetPhysicalFunction to virnetdev.c * src/util/interface.c, src/util/interface.h, src/util/virnetdev.c, src/util/virnetdev.h: Move APIs --- src/util/interface.c |

Re: [libvirt] [Openstack] Libvirt block live migration with OpenStack Diablo

2011-11-17 Thread Kei.masumoto
I think you should use exactly same template as below. https://github.com/openstack/nova/blob/master/nova/virt/libvirt.xml.template Kei (2011/11/17 2:41), Doude wrote: Hi all, I use OpenStack Diablo release 2011.3-0ubuntu6.2 on ubuntu 11.10 with libvirt 0.9.2-4ubuntu15.1 I try to block

Re: [libvirt] [Openstack] Libvirt block live migration with OpenStack Diablo

2011-11-17 Thread Doude
Hi Kei, I use the Diablo release of openStack and I didn't change anything in the libvirt XML template. I can saw a difference for the console file. The trunk version of Nova use a file for the logging console but the Diablo Release use a pipe. Can I change it manually ? Must I open a bur for

Re: [libvirt] make docs fails on EL5

2011-11-17 Thread Eric Blake
On 11/17/2011 01:25 AM, Daniel Berteaud wrote: And it looks like the error is caused by there is some tags in the html is not campatible with W3C, though not sure why it comes. Not sure if it's relevant, I'm using xhtml1-dtds 1.0-7.1.1 (from the base CentOS 5.7 repo) Nobody else has this

Re: [libvirt] bug: try to take disk snapshot for LVM2 Volume

2011-11-17 Thread Eric Blake
On 11/17/2011 02:11 AM, shu ming wrote: Checking the source of the disk will exclude the case when the source disk is block device while the snapshot target is given manually by the users with snapshot-create --xmlfile or virsh snapshot-create-as --diskspec. Why not check the snapshot

Re: [libvirt] Upgrade-problems from qemu-0.14.1 + libvirt-0.8.4 to qemu-0.15.1 + libvirt-0.9.6: Why I think multifunction=on is a bad idea...

2011-11-17 Thread Eric Blake
On 11/17/2011 04:54 AM, Philipp Hahn wrote: Hello Eric, Am Dienstag 15 November 2011 22:33:20 schrieb Eric Blake: Is there a way to select which ROM image qemu uses from the qemu command line? The file names are explicitly added to the qemu command-line: qemu:commandline qemu:arg

Re: [libvirt] Upgrade-problems from qemu-0.14.1 + libvirt-0.8.4 to qemu-0.15.1 + libvirt-0.9.6: Why I think multifunction=on is a bad idea...

2011-11-17 Thread Daniel P. Berrange
On Thu, Nov 17, 2011 at 06:50:57AM -0700, Eric Blake wrote: On 11/17/2011 04:54 AM, Philipp Hahn wrote: Hello Eric, Am Dienstag 15 November 2011 22:33:20 schrieb Eric Blake: Is there a way to select which ROM image qemu uses from the qemu command line? The file names are

Re: [libvirt] bug: try to take disk snapshot for LVM2 Volume

2011-11-17 Thread Dave Allan
On Wed, Nov 16, 2011 at 08:45:34AM -0700, Eric Blake wrote: On 11/15/2011 08:20 PM, Dave Allan wrote: After working on this some more, I think that identifying problematic file systems, like devtmpfs, is too tricky to be portable. But I think we can meet halfway - right now, the libvirt

Re: [libvirt] [PATCH V4 03/10] Make filter creation in root table more flexible

2011-11-17 Thread Stefan Berger
On 11/16/2011 08:02 PM, Eric Blake wrote: On 10/26/2011 05:36 AM, Stefan Berger wrote: Use the previously introduced chain priorities to sort the chains for access from an interface's 'root' table and have them created in the proper order. This gets rid of a lot of code that was previously

Re: [libvirt] New feature for libvirt

2011-11-17 Thread Stefan Berger
On 11/17/2011 02:04 AM, Amit Tewari wrote: Hi, I wanted to suggest a new feature development in libvirt network filter. Currently in libvirt network filter there is no support for ip aliasing, but we want to add this feature so that libvirt learns multiple ip address for a virtual machine.

Re: [libvirt] [PATCH V4 04/10] Use scripting for cleaning and renaming of chains

2011-11-17 Thread Eric Blake
On 10/26/2011 05:36 AM, Stefan Berger wrote: Use scripts for the renaming and cleaning up of chains. This allows us to get rid of some of the code that is only capable of renaming and removing chains whose names are hardcoded. Resuming where I left off, in the hopes that this helps before you

Re: [libvirt] bug: try to take disk snapshot for LVM2 Volume

2011-11-17 Thread Eric Blake
On 11/17/2011 08:04 AM, Dave Allan wrote: After an offline conversation with Eric about why file type is a good proxy for a filesystem that is unsuitable for a snapshot, I'm in agreement with this patch. The argument boils down to 1) block devices are really the only non-regular files that

Re: [libvirt] [PATCH V4 04/10] Use scripting for cleaning and renaming of chains

2011-11-17 Thread Stefan Berger
On 11/17/2011 12:33 PM, Eric Blake wrote: On 10/26/2011 05:36 AM, Stefan Berger wrote: The resulting list of chain names is then used to delete all the found chains by first flushing and then deleting them. The same function is also used for renaming temporary filters to their final names. I

[libvirt] [PATCH V5 01/10] Add function to get hash tables key/value pairs

2011-11-17 Thread Stefan Berger
Add a function to the virHashTable for getting an array of the hash table's key-value pairs and have the keys (optionally) sorted. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- v5: - follwed Eric Blake's suggestions: - added better description to new function - return array

[libvirt] [PATCH V5 02/10] Introduce an internal priority for chains

2011-11-17 Thread Stefan Berger
For better handling of the sorting of chains introduce an internally used priority. Use a lookup table to store the priorities. For now their actual values do not matter just that the values cause the chains to be properly sorted through changes in the following patches. However, the values are

[libvirt] [PATCH V5 09/10] Interleave jumping into chains with filtering rules in root table

2011-11-17 Thread Stefan Berger
The previous patch extends the priority of filtering rules into negative numbers. We now use this possibility to interleave the jumping into chains with filtering rules to for example create the 'root' table of an interface with the following sequence of rules: Bridge chain: libvirt-I-vnet0,

[libvirt] [PATCH V5 06/10] Extend the filter XML to support priorities of chains

2011-11-17 Thread Stefan Berger
This patch extends the filter XML to support priorities of chains in the XML. An example would be: filter name='allow-arpxyz' chain='arp-xyz' priority='200' [...] /filter The permitted values for priorities are [-1000, 1000]. By setting the pririty of a chain the order in which it is accessed

[libvirt] [PATCH V5 04/10] Use scripting for cleaning and renaming of chains

2011-11-17 Thread Stefan Berger
Use scripts for the renaming and cleaning up of chains. This allows us to get rid of some of the code that is only capable of renaming and removing chains whose names are hardcoded. A shell function 'collect_chains' is introduced that is given the name of an ebtables chain and then recursively

[libvirt] [PATCH V5 10/10] Add test cases

2011-11-17 Thread Stefan Berger
Add test case for the chain names with known prefixes and the chain priority. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- tests/nwfilterxml2xmlin/chain_prefixtest1.xml | 37 + tests/nwfilterxml2xmlout/chain_prefixtest1.xml | 21 ++

[libvirt] [PATCH V5 07/10] Enable chains with names having a known prefix

2011-11-17 Thread Stefan Berger
This patch enables chains that have a known prefix in their name. Known prefixes are: 'ipv4', 'ipv6', 'arp', 'rarp'. All prefixes are also protocols that can be evaluated on the ebtables level. Following the prefix they will be automatically connected to an interface's 'root' chain and jumped

[libvirt] [PATCH V5 00/10] Make inner workings of nwfilters more flexible + extensions

2011-11-17 Thread Stefan Berger
The following series of patches re-does some of the inner workings of nwfilters with the goal to enable users to write filters that have other than the system-known chains supported right now ('root','arp','rarp','ipv4' and 'ipv6'). Ideally users should be able to provide a chain name in the

[libvirt] [ANNOUNCE] libguestfs webinar TOMORROW (Friday)

2011-11-17 Thread Richard W.M. Jones
I'll be holding a libguestfs live “webinar” tomorrow, Friday, 18th November 2011 at 16:00 UTC. To convert the date and time to your timezone, do: date -d '2011-11-17 16:00Z' The programme will include: - An introduction to libguestfs features. - Live demonstrations of guestfish, a Python

Re: [libvirt] [PATCH v2 1/2] XML definitions for guest NUMA and parsing routines

2011-11-17 Thread Eric Blake
On 11/15/2011 04:48 AM, Daniel P. Berrange wrote: On Fri, Nov 11, 2011 at 06:21:45PM +0530, Bharata B Rao wrote: XML definitions for guest NUMA and parsing routines. From: Bharata B Rao bhar...@linux.vnet.ibm.com This patch adds XML definitions for guest NUMA specification and contains

Re: [libvirt] [PATCH v2 2/2] qemu: Generate -numa option

2011-11-17 Thread Eric Blake
On 11/15/2011 04:49 AM, Daniel P. Berrange wrote: On Fri, Nov 11, 2011 at 06:23:04PM +0530, Bharata B Rao wrote: qemu: Generate -numa option From: Bharata B Rao bhar...@linux.vnet.ibm.com Add routines to generate -numa QEMU command line option based on numa ... /numa XML specifications.

Re: [libvirt] [PATCH V5 01/10] Add function to get hash tables key/value pairs

2011-11-17 Thread Eric Blake
On 11/17/2011 01:11 PM, Stefan Berger wrote: Add a function to the virHashTable for getting an array of the hash table's key-value pairs and have the keys (optionally) sorted. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- v5: - follwed Eric Blake's suggestions: -

Re: [libvirt] [libvirt-glib] Adjust example to pygobject-3.0

2011-11-17 Thread Guido Günther
Hi, attached patch makes the example work again with recent pygobject-3.0 which doesn't allow to import gtk anymore. Cheers, -- Guido On Thu, Nov 17, 2011 at 10:36:23PM +0100, Guido Günther wrote: --- examples/event-test.py |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-)

[libvirt] [PATCH V5 01.5/10] tests: test recent hash addition

2011-11-17 Thread Eric Blake
Excercise the new hash API, to ensure we avoid regressions. * tests/hashtest.c (testHashGetItems): New test. --- I'd still feel a bit better if we had coverage for the new function in tests/hashtest.c, but I'll let that slide to another patch; On second thought, writing a test now wasn't too

Re: [libvirt] [PATCH V5 02/10] Introduce an internal priority for chains

2011-11-17 Thread Eric Blake
On 11/17/2011 01:11 PM, Stefan Berger wrote: For better handling of the sorting of chains introduce an internally used priority. Use a lookup table to store the priorities. For now their actual values do not matter just that the values cause the chains to be properly sorted through changes in

Re: [libvirt] [PATCH V5 03/10] Make filter creation in root table more flexible

2011-11-17 Thread Eric Blake
On 11/17/2011 01:11 PM, Stefan Berger wrote: Use the previously introduced chain priorities to sort the chains for access from an interface's 'root' table and have them created in the proper order. This gets rid of a lot of code that was previously creating the chains in a more hardcoded way.

Re: [libvirt] [PATCH V5 04/10] Use scripting for cleaning and renaming of chains

2011-11-17 Thread Eric Blake
On 11/17/2011 01:11 PM, Stefan Berger wrote: Use scripts for the renaming and cleaning up of chains. This allows us to get rid of some of the code that is only capable of renaming and removing chains whose names are hardcoded. A shell function 'collect_chains' is introduced that is given the

Re: [libvirt] [PATCH V5 05/10] Use the actual names of chains in data structure

2011-11-17 Thread Eric Blake
On 11/17/2011 01:11 PM, Stefan Berger wrote: Use the name of the chain rather than its type index (enum). This pushes the later enablement of chains with user-given names into the XML parser. For now we still only allow those names that are well known ('root', 'arp', 'rarp', 'ipv4' and

Re: [libvirt] [PATCH V5 06/10] Extend the filter XML to support priorities of chains

2011-11-17 Thread Eric Blake
On 11/17/2011 01:11 PM, Stefan Berger wrote: This patch extends the filter XML to support priorities of chains in the XML. An example would be: filter name='allow-arpxyz' chain='arp-xyz' priority='200' [...] /filter The permitted values for priorities are [-1000, 1000]. By setting the

Re: [libvirt] [PATCH V5 07/10] Enable chains with names having a known prefix

2011-11-17 Thread Eric Blake
On 11/17/2011 01:11 PM, Stefan Berger wrote: This patch enables chains that have a known prefix in their name. Known prefixes are: 'ipv4', 'ipv6', 'arp', 'rarp'. All prefixes are also protocols that can be evaluated on the ebtables level. Following the prefix they will be automatically

Re: [libvirt] [PATCH V5 07/10] Enable chains with names having a known prefix

2011-11-17 Thread Eric Blake
On 11/17/2011 01:11 PM, Stefan Berger wrote: + +if (strlen(chainname) MAX_CHAIN_SUFFIX_SIZE) { +virNWFilterReportError(VIR_ERR_INVALID_ARG, + _(Name of chain is longer than %u characters), + MAX_CHAIN_SUFFIX_SIZE); +

Re: [libvirt] [PATCH V5 08/10] Extend rule priorities into negative numbers

2011-11-17 Thread Eric Blake
On 11/17/2011 01:11 PM, Stefan Berger wrote: So far rules' priorities have only been valid in the range [0,1000]. Now I am extending their priority into the range [-1000, 1000] for subsequently being able to sort rules and the access of (jumps into) chains following priorities.

Re: [libvirt] [PATCH V5 10/10] Add test cases

2011-11-17 Thread Eric Blake
On 11/17/2011 01:11 PM, Stefan Berger wrote: Add test case for the chain names with known prefixes and the chain priority. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- tests/nwfilterxml2xmlin/chain_prefixtest1.xml | 37 +

Re: [libvirt] [PATCH V5 09/10] Interleave jumping into chains with filtering rules in root table

2011-11-17 Thread Eric Blake
On 11/17/2011 01:11 PM, Stefan Berger wrote: The previous patch extends the priority of filtering rules into negative numbers. We now use this possibility to interleave the jumping into chains with filtering rules to for example create the 'root' table of an interface with the following