Re: [libvirt] [PATCH v5 2/2] Add de-association handling to macvlan code

2012-02-24 Thread Laine Stump
While going through this code to clean up the white-space problems, I found 3 issues that need to be addressed before I can push it. Sorry I missed these before. If you can base the new (and I hope final! :-) version on the version where I've already corrected the whitespace, that would be very

[libvirt] [PATCH] virsh: fix informational message in iface-bridge command

2012-02-24 Thread Laine Stump
See: https://bugzilla.redhat.com/show_bug.cgi?id=797066 The position of the bridge name and ethernet device name were accidentally swapped in the message informing of success creating the bridge. --- tools/virsh.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [PATCH] virsh: fix informational message in iface-bridge command

2012-02-24 Thread Laine Stump
On 02/24/2012 02:34 PM, Laine Stump wrote: See: https://bugzilla.redhat.com/show_bug.cgi?id=797066 The position of the bridge name and ethernet device name were accidentally swapped in the message informing of success creating the bridge. --- tools/virsh.c |2 +- 1 files changed, 1

[libvirt] [PATCH] qemu: fix cleanup of bridge during failure of qemuDomainAttachNetDevice

2012-02-25 Thread Laine Stump
From: Laine Stump la...@redhat.com In qemuDomainAttachNetDevice, the guest's tap interface has only been attached to the bridge if iface_connected is true. It's possible for an error to occur prior to that happening, and previously we would attempt to remove the tap interface from the bridge even

[libvirt] [PATCH] libxl: eliminate memory leak in libxmlDomainModifyDeviceFlags

2012-02-27 Thread Laine Stump
I found this randomly by examination when a tag search led me to this file. I don't have a setup to test it, but it appears fairly obvious that this call to virDomainDeviceDefParse is both unnecessary (since it will again be called at the top of the immediately following if(), and if not there,

Re: [libvirt] [PATCH] qemu: fix cleanup of bridge during failure of qemuDomainAttachNetDevice

2012-02-28 Thread Laine Stump
On 02/27/2012 01:15 PM, Eric Blake wrote: On 02/25/2012 04:40 PM, Laine Stump wrote: From: Laine Stump la...@redhat.com In qemuDomainAttachNetDevice, the guest's tap interface has only been attached to the bridge if iface_connected is true. It's possible for an error to occur prior

Re: [libvirt] [PATCH] libxl: eliminate memory leak in libxmlDomainModifyDeviceFlags

2012-02-28 Thread Laine Stump
On 02/27/2012 01:11 PM, Eric Blake wrote: On 02/27/2012 04:01 AM, Laine Stump wrote: I found this randomly by examination when a tag search led me to this file. I don't have a setup to test it, but it appears fairly obvious that this call to virDomainDeviceDefParse is both unnecessary (since

[libvirt] [PATCHv2 00/17] Support for interface type='hostdev'

2012-02-28 Thread Laine Stump
This series of patches enhances the interface device to support a sort of intelligent hostdev, i.e. PCI passthrough where device-type specific initialization is done prior to assigning the device to the guest, in particular to allow setting the MAC address and do 802.1QbX setup for network

[libvirt] [PATCH 01/17] conf: add missing device types to virDomainDevice(Type|Def)

2012-02-28 Thread Laine Stump
Not all device types were represented in virDomainDeviceType, so some types of devices couldn't be represented in a virDomainDeviceDef (which requires a different type of pointer in the union for each different kind of device). Since serial, parallel, channel, and console devices are all

[libvirt] [PATCH 02/17] conf: relocate virDomainDeviceDef and virDomainHostdevDef

2012-02-28 Thread Laine Stump
This patch is only code movement + adding some forward definitions of typedefs. virDomainHostdevDef (not just a pointer to it, but an actual object) will be needed in virDomainNetDef and virDomainActualNetDef, so it must be relocated earlier in the file. Likewise, virDomainDeviceDef will be

[libvirt] [PATCH 09/17] conf: put subsys part of virDomainHostdevDef into its own struct

2012-02-28 Thread Laine Stump
To shorten some new code that accesses the many fields within the subsys struct of a hostdev, create a separate toplevel, typedefed virDomainHostdevSubsys struct so that we can define temporary pointers to the subsys part. --- New patch for V2. src/conf/domain_conf.h | 31

[libvirt] [PATCH 03/17] conf: reorder static functions in domain_conf.c

2012-02-28 Thread Laine Stump
No code change, movement only. This is necessary to eliminate forward references. --- V2: No change src/conf/domain_conf.c | 417 1 files changed, 208 insertions(+), 209 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c

[libvirt] [PATCH 05/17] conf: add device pointer to args of virDomainDeviceInfoIterate callback

2012-02-28 Thread Laine Stump
There will be cases where the iterator callback will need to know the type of the device whose info is being operated on, and possibly even need to use some of the device's config. This patch adds a virDomainDeviceDefPtr to the args of every callback, and fills it in appropriately as the devices

[libvirt] [PATCH 04/17] qemu: rename virDomainDeviceInfoPtr variables to avoid confusion

2012-02-28 Thread Laine Stump
The virDomainDeviceInfoPtrs in qemuCollectPCIAddress and qemuComparePCIDevice are named dev and dev1, but those functions will be changed (in order to match a change in the args sent to virDomainDeviceInfoIterate() callback args) to contain a virDomainDeviceDefPtr device. This patch renames dev

[libvirt] [PATCH 06/17] conf: make hostdev info a separate object

2012-02-28 Thread Laine Stump
In order to allow for a virDomainHostdevDef that uses the virDomainDeviceInfo of a higher level device (such as a virDomainNetDef), this patch changes the virDomainDeviceInfo in the HostdevDef into a virDomainDeviceInfoPtr. Rather than adding checks all over the code to check for a null info, we

[libvirt] [PATCH 07/17] conf: HostdevDef parse/format helper functions

2012-02-28 Thread Laine Stump
In an upcoming patch, virDomainNetDef will acquire a virDomainHostdevDef, and the interface XML will take on some of the elements of a hostdev. To avoid duplicating the code for parsing and formatting the source element (which will be nearly identical in these two cases), this patch factors those

[libvirt] [PATCH 10/17] conf: hostdev utility functions

2012-02-28 Thread Laine Stump
Three new functions useful in other files: virDomainHostdevInsert: Add a new hostdev at the end of the array. This would more sensibly be called virDomainHostdevAppend, but the existing functions for other types of devices are called Insert. virDomainHostdevRemove: Eliminates one entry from

[libvirt] [PATCH 16/17] qemu: use virDomainNetRemove instead of inline code

2012-02-28 Thread Laine Stump
The code being replaced is exactly identical to the newly global function, right down to the comment. --- New patch in V2 src/qemu/qemu_hotplug.c | 14 +- 1 files changed, 1 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index

[libvirt] [PATCH 11/17] qemu: re-order functions in qemu_hotplug.c

2012-02-28 Thread Laine Stump
Code movement only, no functional change. This is necessary to prevent a forward reference in an upcoming patch. --- New patch for V2. src/qemu/qemu_hotplug.c | 289 --- 1 files changed, 145 insertions(+), 144 deletions(-) diff --git

[libvirt] [PATCH 12/17] qemu: refactor hotplug detach of hostdevs

2012-02-28 Thread Laine Stump
This refactoring is necessary to support hotplug detach of type=hostdev network devices, but needs to be in a separate patch to make potential debugging of regressions more practical. Rather than the lowest level functions searching for a matching device, the search is now done in the toplevel

[libvirt] [PATCH 08/17] conf: give each hostdevdef a parent pointer

2012-02-28 Thread Laine Stump
The parent can be any type of device. It defaults to type=none, and a NULL pointer. The intent is that if a hostdevdef is contained in the def for a higher level device (e.g. virDomainNetDef), hostdev-parent will point to the higher level device, and type will be set to that type of device. This

[libvirt] [PATCH 13/17] conf: parse/format type='hostdev' network interfaces

2012-02-28 Thread Laine Stump
This is the new interface type that sets up a PCI/USB network device to be assigned to the guest with PCI/USB passthrough after initializing some network device-specific things from the config (e.g. MAC address, virtualport profile parameters). Here is an example of the syntax: interface

[libvirt] [PATCH 14/17] qemu: support type='hostdev' network devices at domain start

2012-02-28 Thread Laine Stump
This patch makes sure that each network device (interface) of type='hostdev' appears on both the hostdevs list and the nets list of the virDomainDef, and it modifies the qemu driver startup code so that these devices will be presented to qemu on the commandline as hostdevs rather than as network

[libvirt] [PATCH 15/17] conf: change virDomainNetRemove from static to global

2012-02-28 Thread Laine Stump
This exact code is duplicated in qemuDomainDetachNetDevice(). --- New patch in V2. (yeah, I just noticed the movement of the virDomainHostdevXX() declarations in this patch; I guess I was rearranging for consistent ordering. If this concerns anyone, I can squash it out before I push.)

[libvirt] [PATCH 17/17] qemu: support type=hostdev network device hotplug attach/detach

2012-02-28 Thread Laine Stump
qemuDomainAttachNetDevice - re-ordered some things at start of function because networkAllocateActualDevice should always be run and a slot in def-nets always allocated, but host_net_add isn't needed if the actual type is hostdev. - if actual type is hostdev, defer to

Re: [libvirt] [PATCHv2 00/17] Support for interface type='hostdev'

2012-02-28 Thread Laine Stump
On 02/28/2012 03:14 PM, Laine Stump wrote: This series of patches enhances the interface device to support a sort of intelligent hostdev, i.e. PCI passthrough where device-type specific initialization is done prior to assigning the device to the guest, in particular to allow setting the MAC

Re: [libvirt] [PATCH 1/1] complete netlink event integration

2012-02-29 Thread Laine Stump
won't find any new issues *this* time :-) On 02/28/2012 10:34 AM, D. Herrendoerfer wrote: From: D. Herrendoerfer d.herrendoer...@herrendoerfer.name this patch adds the changes proposed by Laine Stump to netlink event code. Signed-off-by: D. Herrendoerfer d.herrendoer...@herrendoerfer.name

[libvirt] [PATCH] Changes squashed into netlink event service patches

2012-02-29 Thread Laine Stump
Squashed into util: Add netlink event handling to virnetlink.c (Note that I am also re-sending the complete patchset with these changes already squashed in). * The remove callback is now an argument of virNetlinnkEventAddClient instead of virNetlinkeRemoveClient, and is stored in the

[libvirt] [PATCHv7 0/2] util: Add netlink event handling code

2012-02-29 Thread Laine Stump
This is hopefully the final spin of these patches, It squashes in all the changes from: https://www.redhat.com/archives/libvir-list/2012-February/msg01103.html as well as: https://www.redhat.com/archives/libvir-list/2012-February/msg01173.html Dirk, please test these out and let me know if

[libvirt] [PATCHv7 1/2] util: Add netlink event handling to virnetlink.c

2012-02-29 Thread Laine Stump
From: D. Herrendoerfer d.herrendoer...@herrendoerfer.name This code adds a netlink event interface to libvirt. It is based upon the event_poll code and makes use of it. An event is generated for each netlink message sent to the libvirt pid. Signed-off-by: D. Herrendoerfer

[libvirt] [PATCHv7 2/2] Add de-association handling to macvlan code

2012-02-29 Thread Laine Stump
From: D. Herrendoerfer d.herrendoer...@herrendoerfer.name Add de-association handling for 802.1qbg (vepa) via lldpad netlink messages. Also adds the possibility to perform an association request without waiting for a confirmation. Signed-off-by: D. Herrendoerfer

Re: [libvirt] [PATCH] build: update to latest gnulib

2012-02-29 Thread Laine Stump
On 02/24/2012 07:39 PM, Eric Blake wrote: It's been a while, and we're between releases, so now's as good a time as any to resync. I didn't notice any showstopper bugs being fixed, but we definitely get some improvements, such as tighter syntax checks. I just noticed this hasn't been

Re: [libvirt] [PATCH 1/3] qemu: require json for block jobs

2012-02-29 Thread Laine Stump
On 02/18/2012 12:44 PM, Eric Blake wrote: Block job commands are not part of upstream qemu until 1.1; and proper support of job completion and cancellation depends on being able to receive QMP events, which implies the JSON monitor. Additionally, some early versions of block job commands were

Re: [libvirt] [PATCH 2/3] qemu: pass block pull backing file to monitor

2012-02-29 Thread Laine Stump
On 02/18/2012 12:44 PM, Eric Blake wrote: This actually wires up the new optional parameter to block_stream: http://wiki.qemu.org/Features/LiveBlockMigration/ImageStreamingAPI The error checking is still sparse, since libvirt must not use qemu-img or header probing on a qcow2 file in use by

Re: [libvirt] [PATCH 3/3] virsh: expose partial pull

2012-02-29 Thread Laine Stump
On 02/18/2012 12:44 PM, Eric Blake wrote: Now virsh can call virDomainBlockRebase. ACK. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 1/1] complete netlink event integration

2012-02-29 Thread Laine Stump
On 02/29/2012 08:43 AM, D. Herrendoerfer wrote: On Feb 29, 2012, at 9:51 AM, Laine Stump wrote: Since I found a couple other problems, but have made you suffer through enough back and forth already, I've made some final suggested changes myself, and am sending a diff patch as a response

Re: [libvirt] [PATCH v5 2/2] Add de-association handling to macvlan code

2012-02-29 Thread Laine Stump
On 02/24/2012 09:29 AM, D. Herrendoerfer wrote: The callback mechanism is not re-armed when libvirt is restarted now. The reason is: lldpad remembers who sent the associate by pid - since in theory there could be multiple agents performing associations. So if the libvirt pid changes, there is

[libvirt] [PATCH 0/2] two cosmetic fixes to netlink code

2012-03-01 Thread Laine Stump
I pushed the following under the trivial rule yesterday. Much to my discredit, I screwed up twice: 1) I ran git send-email to send the patches to the list along with a pushed under trivial rule message, but then got distracted in the middle of the H Something shiny!! - yes,

[libvirt] [PATCH 2/2] fix alphabetical order of virNetlink functions in symbol file

2012-03-01 Thread Laine Stump
--- src/libvirt_private.syms |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index ce4b7f7..a104e70 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1271,12 +1271,11 @@

[libvirt] [PATCH 1/2] util: wrap virnetlink.c to 80 columns

2012-03-01 Thread Laine Stump
--- src/util/virnetlink.c | 28 +--- 1 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index 0a1c121..264fcdb 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -270,7 +270,7 @@

[libvirt] [PATCH] util: remove unneeded #include in virrandom.c

2012-03-01 Thread Laine Stump
Commit 7c90026 added #include conf/domain_conf.h to util/virrandom.c. Fortunately it didn't actually use anything from domain_conf.h, since as far as I'm aware, files in util aren't allowed to reference anything in conf (although the opposite is allowed). So this #include is unnecessary. I

Re: [libvirt] [PATCH] Use the same MAC address that is defined in domain XML for attached-mac field.

2012-03-01 Thread Laine Stump
On 02/29/2012 07:26 PM, Ansis Atteka wrote: On Sat, Feb 18, 2012 at 7:07 PM, Laine Stump la...@laine.org mailto:la...@laine.org wrote: On 02/17/2012 02:51 PM, Ansis Atteka wrote: On Fri, Feb 17, 2012 at 10:55 AM, Laine Stump la...@laine.org mailto:la...@laine.org

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-01 Thread Laine Stump
On 03/01/2012 11:55 AM, Stefan Berger wrote: On 03/01/2012 11:32 AM, Roopa Prabhu wrote: On 3/1/12 7:52 AM, Stefan Bergerstef...@linux.vnet.ibm.com wrote: On 03/01/2012 10:32 AM, Roopa Prabhu wrote: On 3/1/12 4:39 AM, Stefan Bergerstef...@linux.vnet.ibm.com wrote: On 03/01/2012 04:02

Re: [libvirt] [PATCH] util: remove unneeded #include in virrandom.c

2012-03-01 Thread Laine Stump
On 03/01/2012 11:53 AM, Daniel P. Berrange wrote: On Thu, Mar 01, 2012 at 11:43:04AM -0500, Laine Stump wrote: Commit 7c90026 added #include conf/domain_conf.h to util/virrandom.c. Fortunately it didn't actually use anything from domain_conf.h, since as far as I'm aware, files in util aren't

[libvirt] [PATCH] util: combine three bools in virNetDevTapCreateInBridgePort into one flags

2012-03-01 Thread Laine Stump
With an additional new bool added to determine whether or not to discourage the use of the supplied MAC address by the bridge itself, virNetDevTapCreateInBridgePort had three booleans (well, 2 bools and an int used as a bool) in the arg list, which made it increasingly difficult to follow what was

Re: [libvirt] [PATCH] Use the same MAC address that is defined in domain XML for attached-mac field.

2012-03-01 Thread Laine Stump
On 03/01/2012 01:19 PM, Laine Stump wrote: On 02/29/2012 07:26 PM, Ansis Atteka wrote: On Sat, Feb 18, 2012 at 7:07 PM, Laine Stump la...@laine.org mailto:la...@laine.org wrote: On 02/17/2012 02:51 PM, Ansis Atteka wrote: On Fri, Feb 17, 2012 at 10:55 AM, Laine Stump

Re: [libvirt] [PATCH] util: combine three bools in virNetDevTapCreateInBridgePort into one flags

2012-03-02 Thread Laine Stump
On 03/01/2012 03:59 PM, Eric Blake wrote: On 03/01/2012 01:48 PM, Laine Stump wrote: With an additional new bool added to determine whether or not to discourage the use of the supplied MAC address by the bridge itself, virNetDevTapCreateInBridgePort had three booleans (well, 2 bools

Re: [libvirt] [PATCH] Use the same MAC address that is defined in domain XML for attached-mac field.

2012-03-02 Thread Laine Stump
On 02/16/2012 06:49 PM, Ansis Atteka wrote: Currently libvirt sets the attached-mac to altered MAC address that has first byte set to FE. This patch will change that behavior by using the original (unaltered) MAC address from the domain XML configuration file. Okay, after much discussion, and

Re: [libvirt] [PATCH] build: prohibit cross-inclusion

2012-03-02 Thread Laine Stump
On 03/01/2012 07:40 PM, Eric Blake wrote: Make it easier to detect invalid cross-directory includes, by adding a syntax check. The check is designed to be extensible: the default case lists only the non-driver directories, and specific directories can list a different set (for example, util/

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Laine Stump
On 03/02/2012 09:12 AM, Gerhard Stenzel wrote: On Thu, 2012-03-01 at 13:02 -0500, Laine Stump wrote: In the case of hostdev though, there is not necessarily any netdev driver at all in the host (and thus no linkdev to attach a macvtap to), certainly not after it's attached to the guest

Re: [libvirt] [PATCH 0/4] Support mac and port profile for interface type='hostdev'

2012-03-02 Thread Laine Stump
On 03/01/2012 04:02 AM, Roopa Prabhu wrote: This patch series is based on laines patches to support interface type='hostdev'. https://www.redhat.com/archives/libvir-list/2012-February/msg01126.html It support to set mac and port profile on an interface of type hostdev. * If virtualport is

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Laine Stump
On 03/02/2012 11:58 AM, Stefan Berger wrote: On 03/02/2012 11:37 AM, Gerhard Stenzel wrote: Letting the guest do the association is an option, which should work already (even if noone probably tested it yet), but the question is really how much control should the host have vs the guest. There

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-02 Thread Laine Stump
On 03/02/2012 03:16 PM, Roopa Prabhu wrote: On 3/2/12 11:27 AM, Laine Stump la...@laine.org wrote: On 03/02/2012 11:58 AM, Stefan Berger wrote: On 03/02/2012 11:37 AM, Gerhard Stenzel wrote: Letting the guest do the association is an option, which should work already (even if noone probably

Re: [libvirt] [PATCH 0/4] Support mac and port profile for interface type='hostdev'

2012-03-02 Thread Laine Stump
On 03/02/2012 03:03 PM, Roopa Prabhu wrote: On 3/2/12 11:04 AM, Laine Stump la...@laine.org wrote: On 03/01/2012 04:02 AM, Roopa Prabhu wrote: This patch series is based on laines patches to support interface type='hostdev'. https://www.redhat.com/archives/libvir-list/2012-February/msg01126

Re: [libvirt] [PATCH] qemu: Don't parse device twice in attach/detach

2012-03-03 Thread Laine Stump
On 03/01/2012 01:56 PM, Michal Privoznik wrote: Some nits are generated during XML parse (e.g. MAC address of an interface); However, with current implementation, if we are plugging a device both to persistent and live config, we parse given XML twice: first time for live, second for config.

Re: [libvirt] [PATCH] blockResize: add flag for bytes

2012-03-03 Thread Laine Stump
On 03/03/2012 09:48 AM, Eric Blake wrote: Qemu supports sizing by bytes; we shouldn't force the user to round up if they really wanted an unaligned total size. * include/libvirt/libvirt.h.in (VIR_DOMAIN_BLOCK_RESIZE_BYTES): New flag. * src/libvirt.c (virDomainBlockResize): Document it. *

[libvirt] [PATCH] util: fail attempts to use same mac address for guest and tap

2012-03-05 Thread Laine Stump
This patch is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=798467 If a guest's tap device is created using the same MAC address the guest uses for its own network card (which connects to the tap device), the Linux kernel will log the following message and traffic will not pass:

Re: [libvirt] [PATCH 1/4] pci: Add two new pci utils pciDeviceGetVirtualFunctionInfo and pciConfigAddressToSysfsFile

2012-03-05 Thread Laine Stump
On 03/04/2012 10:15 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com pciDeviceGetVirtualFunctionInfo returns pf netdevice name and virtual function index for a given vf. This is just a wrapper around existing functions to return vf's pf and vf_index with one api call

Re: [libvirt] [PATCH 2/4] virtnetdev: Add support functions for mac and portprofile associations on a hostdev

2012-03-05 Thread Laine Stump
On 03/04/2012 10:15 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com This patch adds the following: - functions to set and get vf configs - Functions to replace and store vf configs (Only mac address is handled today. But the functions can be easily extended for vlans and

Re: [libvirt] [PATCH 3/4] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-05 Thread Laine Stump
I encountered two conflicts when I rebased this patch to upstream. Noted in the comments. On 03/04/2012 10:15 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com This patch includes the following changes - removes some netlink functions which are now available in virnetdev.c - Adds

[libvirt] [PATCH] util: eliminate crash in virNetDevMacVLanCreateWithVPortProfile

2012-03-05 Thread Laine Stump
From: root r...@vlap.laine.org Commit 723d5c (added after the release of 0.9.10) adds a NetlinkEventClient for each interface sent to virNetDevMacVLanCreateWithVPortProfile. This should only be done if the interface actually *has* a virtPortProfile, otherwise the event handler would be a NOP. The

Re: [libvirt] [PATCH] util: fail attempts to use same mac address for guest and tap

2012-03-05 Thread Laine Stump
On 03/05/2012 11:14 AM, Eric Blake wrote: On 03/05/2012 09:05 AM, Laine Stump wrote: This patch is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=798467 If a guest's tap device is created using the same MAC address the guest uses for its own network card (which connects

Re: [libvirt] [PATCH 2/4] virtnetdev: Add support functions for mac and portprofile associations on a hostdev

2012-03-05 Thread Laine Stump
On 03/05/2012 02:50 PM, Roopa Prabhu wrote: On 3/5/12 10:23 AM, Laine Stump la...@laine.org wrote: On 03/04/2012 10:15 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com This patch adds the following: - functions to set and get vf configs - Functions to replace and store vf

Re: [libvirt] [PATCH 15/17] conf: change virDomainNetRemove from static to global

2012-03-05 Thread Laine Stump
On 03/05/2012 03:45 PM, Michal Privoznik wrote: On 28.02.2012 21:14, Laine Stump wrote: This exact code is duplicated in qemuDomainDetachNetDevice(). --- New patch in V2. (yeah, I just noticed the movement of the virDomainHostdevXX() declarations in this patch; I guess I was rearranging

Re: [libvirt] [PATCH 13/17] conf: parse/format type='hostdev' network interfaces

2012-03-05 Thread Laine Stump
On 03/05/2012 03:45 PM, Michal Privoznik wrote: On 28.02.2012 21:14, Laine Stump wrote: This is the new interface type that sets up a PCI/USB network device to be assigned to the guest with PCI/USB passthrough after initializing some network device-specific things from the config (e.g. MAC

Re: [libvirt] [PATCH 17/17] qemu: support type=hostdev network device hotplug attach/detach

2012-03-05 Thread Laine Stump
On 03/05/2012 03:46 PM, Michal Privoznik wrote: On 28.02.2012 21:14, Laine Stump wrote: qemuDomainAttachNetDevice - re-ordered some things at start of function because networkAllocateActualDevice should always be run and a slot in def-nets always allocated, but host_net_add isn't

Re: [libvirt] [PATCH 1/4 v3] pci: Add two new pci utils pciDeviceGetVirtualFunctionInfo and pciConfigAddressToSysfsFile

2012-03-06 Thread Laine Stump
On 03/05/2012 08:12 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com pciDeviceGetVirtualFunctionInfo returns pf netdevice name and virtual function index for a given vf. This is just a wrapper around existing functions to return vf's pf and vf_index with one api call

Re: [libvirt] [PATCH 2/4 v3] virtnetdev: Add support functions for mac and portprofile associations on a hostdev

2012-03-06 Thread Laine Stump
:00 2001 From: Laine Stump la...@laine.org Date: Tue, 6 Mar 2012 04:25:41 -0500 Subject: [PATCH] squash into virtnetdev: Add support functions for mac and portprofile associations on a hostdev * add functions to libvirt_private.syms * add missing definition of virNetDevGetVirtualFunctionInfo when

Re: [libvirt] [PATCH 3/4 v3] virnetdevvportprofile: Changes to support portprofiles for hostdevs

2012-03-06 Thread Laine Stump
On 03/05/2012 08:12 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com This patch includes the following changes - removes some netlink functions which are now available in virnetdev.c - Adds a vf argument to all port profile functions For 802.1Qbh devices, the port profile calls

Re: [libvirt] [PATCHv2 00/17] Support for interface type='hostdev'

2012-03-06 Thread Laine Stump
On 02/28/2012 03:14 PM, Laine Stump wrote: This series of patches enhances the interface device to support a sort of intelligent hostdev, i.e. PCI passthrough where device-type specific initialization is done prior to assigning the device to the guest, in particular to allow setting the MAC

Re: [libvirt] [PATCH 4/4 v3] qemu_hostdev: Add support to install port profile and mac address on hostdevs

2012-03-06 Thread Laine Stump
On 03/05/2012 08:12 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com These changes are applied only if the hostdev has a parent net device. If the parent netdevice has virtual port information, the original virtualport associate functions are called (these set and restore both

Re: [libvirt] [PATCH 4/4 v3] qemu_hostdev: Add support to install port profile and mac address on hostdevs

2012-03-06 Thread Laine Stump
On 03/05/2012 08:12 PM, Roopa Prabhu wrote: From: Roopa Prabhu ropra...@cisco.com These changes are applied only if the hostdev has a parent net device. If the parent netdevice has virtual port information, the original virtualport associate functions are called (these set and restore both

Re: [libvirt] [PATCH 0/4 v3] Support mac and port profile for interface type='hostdev'

2012-03-06 Thread Laine Stump
On 03/05/2012 08:12 PM, Roopa Prabhu wrote: This series implements the below : 01/4 pci: Add two new pci util pciDeviceGetVirtualFunctionInfo and pciConfigAddressToSysfsFile 02/4 virtnetdev: Add support functions for mac and portprofile associations on a hostdev 03/4 virnetdevvportprofile:

[libvirt] [PATCH] util: fix build mingw (and all non-linux) build failure

2012-03-07 Thread Laine Stump
ATTRIBUTE_UNUSED was accidentally forgotten on one arg of a stub function for functionality that's not present on non-linux platforms. This causes a non-linux build with --enable-compile-warnings=error to fail. --- Pushed under build-breaker rule. src/util/pci.c |3 ++- 1 files changed, 2

Re: [libvirt] [PATCH] qemu: Don't parse device twice in attach/detach

2012-03-07 Thread Laine Stump
On 03/07/2012 12:48 PM, Michal Privoznik wrote: Some nits are generated during XML parse (e.g. MAC address of an interface); However, with current implementation, if we are plugging a device both to persistent and live config, we parse given XML twice: first time for live, second for config.

[libvirt] [PATCH 0/7] Various bugfixes related to device management

2012-03-08 Thread Laine Stump
This series contains 7 patches that are mostly related by the face that I noticed the problems they're solving while writing the interface type='hostdev' code during the past couple weeks. After that series was pushed, I sat down to fix everything I'd noticed before I forgot about it. I'm sending

[libvirt] [PATCH 1/7] util: consolidate duplicated error messages in virnetlink.c

2012-03-08 Thread Laine Stump
There are special stub versions of all public functions in this file that are compiled when either libnl isn't available or the platform isn't linux. Each of these functions had two almost identical message, differing only in the function name included in the message. Since log messages already

[libvirt] [PATCH 3/7] qemu: don't 'remove' hostdev objects from domain if operation fails

2012-03-08 Thread Laine Stump
There were certain paths through the hostdev detach code that could lead to the lower level function failing (and not removing the object from the domain's hostdevs list), but the higher level function free'ing the hostdev object anyway. This would leave a stale hostdevdef pointer in the list,

[libvirt] [PATCH 2/7] util: make virDomainLeaseDefFree global

2012-03-08 Thread Laine Stump
It will be used in a different file in an upcoming patch. --- src/conf/domain_conf.c |2 +- src/conf/domain_conf.h |1 + src/libvirt_private.syms |1 + 3 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[libvirt] [PATCH 4/7] util: eliminate device object leaks related to virDomain*Remove*()

2012-03-08 Thread Laine Stump
There are several functions in domain_conf.c that remove a device object from the domain's list of that object type, but don't free the object or return it to the caller to free. In many cases this isn't a problem because the caller already had a pointer to the object and frees it afterward, but

[libvirt] [PATCH 5/7] util: standardize return from functions calling virNetlinkCommand

2012-03-08 Thread Laine Stump
There are several functions that call virNetlinkCommand, and they all follow a common pattern, with three exit labels: err_exit (or cleanup), malformed_resp, and buffer_too_small. All three of these labels do their own cleanup and have their own return. However, the malformed_resp label usually

[libvirt] [PATCH 7/7] qemu: eliminate memory leak in qemuDomainUpdateDeviceConfig

2012-03-08 Thread Laine Stump
This function was freeing a virDomainNetDef with VIR_FREE(). virDomainNetDef is a complex structure with many pointers to other dynamically allocated data; to properly free it virDomainNetDefFree() must be called instead, otherwise several strings (and potentially other things) will be leaked. ---

[libvirt] [PATCH 6/7] qemu: support persistent hotplug of hostdev devices

2012-03-08 Thread Laine Stump
For some reason, although live hotplug of hostdev devices is supported, persistent hotplug is not. This patch adds the proper VIR_DOMAIN_DEVICE_HOSTDEV cases to the switches in qemuDomainAttachDeviceConfig and qemuDomainDetachDeviceConfig. --- src/qemu/qemu_driver.c | 32

Re: [libvirt] Build error on OSX in src/util/virnetlink.c

2012-03-08 Thread Laine Stump
On 03/06/2012 11:28 AM, Eric Blake wrote: On 03/06/2012 09:15 AM, Duncan Rance wrote: Hi, I'm building on OSX with no libnl. I had to do this to get src/util/virnetlink.c to compile: diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index 1575bad..59f3e39 100644 ---

Re: [libvirt] [PATCH v2] Attach vm-id to Open vSwitch interfaces.

2012-03-08 Thread Laine Stump
On 03/07/2012 02:15 AM, Ansis Atteka wrote: This patch will allow OpenFlow controllers to identify which interface belongs to a particular VM by using the Domain UUID. ovs-vsctl get Interface vnet0 external_ids {attached-mac=52:54:00:8C:55:2C, iface-id=83ce45d6-3639-096e-ab3c-21f66a05f7fa,

[libvirt] [PATCH] util: whitespace change to virNetDevOpenvswitchAddPort

2012-03-08 Thread Laine Stump
The indentation on the final lines of the function was off by four spaces, making me wonder for a second if there was something missing. (There wasn't.) --- Pushing under trivial rule. src/util/virnetdevopenvswitch.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff

[libvirt] [PATCH] util: log error on OOM in virNetDevOpenvswitchAddPort

2012-03-08 Thread Laine Stump
OOM conditions silently returned failure. --- src/util/virnetdevopenvswitch.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index e2d5124..61bb9e1 100644 --- a/src/util/virnetdevopenvswitch.c

[libvirt] [PATCH] util: add stub pciConfigAddressToSysfsFile for non-linux platforms

2012-03-08 Thread Laine Stump
Absence of this stub function caused a build failure on mingw32. --- Pushed under build breaker rule (I'm doing way too many of these - I really need to start running autobuild before any push, instead of just make check make syntax-check.) src/util/pci.c |9 + 1 files changed, 9

[libvirt] [PATCH] remove daemon/probes.h from .gitignore

2012-03-08 Thread Laine Stump
The file daemon/probes.h used to be generated as part of a build, but is no longer used. However, a stale copy of it lying around could cause a build to fail. Removing it from .gitignore will make it more likely someone will notice that they have it lying around. --- Although this is a very

[libvirt] [PATCH] util: consolidate duplicated error messages in pci.c

2012-03-08 Thread Laine Stump
This is nearly identical to an earlier patch for virnetlink.c (after fixing it per Eric's recommendations). There are special stub versions of all public functions in this file that are compiled when the platform isn't linux. Each of these functions had an almost identical message, differing only

Re: [libvirt] [PATCH 0/7] Various bugfixes related to device management

2012-03-08 Thread Laine Stump
On 03/08/2012 01:41 PM, Eric Blake wrote: On 03/08/2012 02:24 AM, Laine Stump wrote: This series contains 7 patches that are mostly related by the face that I noticed the problems they're solving while writing the interface type='hostdev' code during the past couple weeks. After that series

Re: [libvirt] [PATCH] util: log error on OOM in virNetDevOpenvswitchAddPort

2012-03-08 Thread Laine Stump
On 03/08/2012 02:00 PM, Eric Blake wrote: On 03/08/2012 11:58 AM, Laine Stump wrote: OOM conditions silently returned failure. --- src/util/virnetdevopenvswitch.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/util/virnetdevopenvswitch.c b/src/util

Re: [libvirt] [PATCH] util: consolidate duplicated error messages in pci.c

2012-03-08 Thread Laine Stump
On 03/08/2012 04:57 PM, Eric Blake wrote: On 03/08/2012 02:53 PM, Laine Stump wrote: This is nearly identical to an earlier patch for virnetlink.c (after fixing it per Eric's recommendations). There are special stub versions of all public functions in this file that are compiled when

Re: [libvirt] [PATCH] remove daemon/probes.h from .gitignore

2012-03-08 Thread Laine Stump
On 03/08/2012 04:59 PM, Eric Blake wrote: On 03/08/2012 02:53 PM, Laine Stump wrote: The file daemon/probes.h used to be generated as part of a build, but is no longer used. However, a stale copy of it lying around could cause a build to fail. Removing it from .gitignore will make it more

[libvirt] [PATCH] conf: eliminate redundant VIR_ALLOC of 1st element of network DNS hosts.

2012-03-09 Thread Laine Stump
virNetworkDNSHostsDefParseXML was calling VIR_ALLOC(def-hosts) if def-hosts was NULL. This is a waste of time, though, since VIR_REALLOC_N is called a few lines further down, prior to any use of def-hosts. (initializing def-nhosts to 0 is also redundant, because the newly allocated memory will

Re: [libvirt] [PATCH] conf: eliminate redundant VIR_ALLOC of 1st element of network DNS hosts.

2012-03-09 Thread Laine Stump
On 03/09/2012 04:23 AM, Michal Privoznik wrote: On 09.03.2012 10:03, Laine Stump wrote: virNetworkDNSHostsDefParseXML was calling VIR_ALLOC(def-hosts) if def-hosts was NULL. This is a waste of time, though, since VIR_REALLOC_N is called a few lines further down, prior to any use of def-hosts

Re: [libvirt] [Qemu-devel] QEMU fstatfs(2) and libvirt SELinux policy

2012-03-09 Thread Laine Stump
On 03/09/2012 09:16 AM, Jiri Denemark wrote: Hi. On Fri, Mar 09, 2012 at 11:32:47 +, Stefan Hajnoczi wrote: ... static __inline__ int platform_test_xfs_fd(int fd) { struct statfs buf; if (fstatfs(fd, buf) 0) return 0; return (buf.f_type ==

Re: [libvirt] [PATCH] qemu: A typo which causes non-exsiting NIC detachment failed

2012-03-12 Thread Laine Stump
On 03/12/2012 11:50 AM, Guannan Ren wrote: --- src/qemu/qemu_hotplug.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) ACK (and I'll push it in a couple hours - I want to add some details to the commit log message) Thanks! diff --git a/src/qemu/qemu_hotplug.c

[libvirt] [PATCH] Emit graphics events when a SPICE client connects/disconnects

2012-03-13 Thread Laine Stump
Wire up the domain graphics event notifications for SPICE. Adapted from a RHEL-only patch written by Dan Berrange that used custom __com.redhat_SPICE events - equivalent events are now available in upstream QEMU (including a SPICE_CONNECTED event, which was missing in the __COM.redhat_SPICE

Re: [libvirt] [PATCH] Emit graphics events when a SPICE client connects/disconnects

2012-03-14 Thread Laine Stump
On 03/14/2012 05:06 AM, Osier Yang wrote: On 03/14/2012 01:45 PM, Laine Stump wrote: Wire up the domain graphics event notifications for SPICE. Adapted from a RHEL-only patch written by Dan Berrange that used custom __com.redhat_SPICE events - equivalent events are now available in upstream

  1   2   3   4   5   6   7   8   9   10   >