Re: [libvirt] creating stream

2017-04-21 Thread Michal Privoznik
On 04/21/2017 01:36 PM, Vasiliy Tolstov wrote: 2017-04-21 14:14 GMT+03:00 Michal Privoznik : That's how strings are encoded in RPC. the first four bytes say how long the string is followed by N bytes (padded to 4 bytes boundary) of the actual string. I know, I'm use https://godoc.org/github.c

[libvirt] [PATCH] util: fix virNetDevSetCoalesce fallback on Win32/FreeBSD

2017-04-21 Thread Daniel P. Berrange
The current fallback stub for virNetDevSetCoalesce is inside an earlier conditional block. This deals with the feature being missing on older Linux platforms. We need a second fallback stub though, outside the top level conditional, to ensure builds work on Win32/FreeBSD platforms too. Signed-off-

Re: [libvirt] [PATCH v2 05/10] nodedev: conf: Split PCI sub-capability parsing to a separate method

2017-04-21 Thread Pavel Hrdina
On Thu, Apr 20, 2017 at 03:05:55PM +0200, Erik Skultety wrote: > Since there's at least SRIOV and MDEV sub-capabilities to be parsed, > let's make the code more readable by splitting it to several logical > blocks. > > Signed-off-by: Erik Skultety > --- > src/conf/node_device_conf.c | 84 >

Re: [libvirt] [PATCH v2 04/10] docs: Utilize our XSLT list generating template more

2017-04-21 Thread Pavel Hrdina
On Thu, Apr 20, 2017 at 03:05:54PM +0200, Erik Skultety wrote: > Since we do have this template at hand, why not using it wherever > possible (list of supported pool types and remote access section). > Also, perform some stylistic micro adjustments. > > Signed-off-by: Erik Skultety > --- > docs/

Re: [libvirt] [PATCH v2 03/10] nodedev: udevProcessPCI: Drop syspath variable

2017-04-21 Thread Pavel Hrdina
On Thu, Apr 20, 2017 at 03:05:53PM +0200, Erik Skultety wrote: > Since we have that information provided by @def which is not a private > object, there is really no need for the variable. > > Signed-off-by: Erik Skultety > --- > src/node_device/node_device_udev.c | 10 +++--- > 1 file change

Re: [libvirt] [PATCH v2 02/10] conf: nodedev: Split virNodeDeviceDefFormat into more functions

2017-04-21 Thread Pavel Hrdina
On Thu, Apr 20, 2017 at 03:05:52PM +0200, Erik Skultety wrote: > Make the code look cleaner by moving the capability specific bits into > separate functions. > > Signed-off-by: Erik Skultety > --- > src/conf/node_device_conf.c | 578 > > 1 file chang

[libvirt] [PATCH] docs: fix typo in closing HTML element

2017-04-21 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- Pushed as a build fix docs/formatdomain.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 5469fc3..9bea3bc 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.h

Re: [libvirt] [PATCH v2 01/10] nodedev: Make use of the compile-time missing enum in switch error

2017-04-21 Thread Pavel Hrdina
On Thu, Apr 20, 2017 at 03:05:51PM +0200, Erik Skultety wrote: > So udevGetDeviceDetails was one those functions using an enum in a s/one those/one of those/ > switch, but since it had a 'default' case, compiler didn't warn about an > unhandled enum. Moreover, the error about an unsupported devic

Re: [libvirt] creating stream

2017-04-21 Thread Vasiliy Tolstov
2017-04-21 14:14 GMT+03:00 Michal Privoznik : > That's how strings are encoded in RPC. the first four bytes say how long the > string is followed by N bytes (padded to 4 bytes boundary) of the actual > string. I know, I'm use https://godoc.org/github.com/davecgh/go-xdr/xdr2 and as i see EncodeStr

Re: [libvirt] [PATCH v2 2/3] conf, docs: Add support for coalesce setting(s)

2017-04-21 Thread Martin Kletzander
On Fri, Apr 21, 2017 at 11:19:36AM +0200, Michal Privoznik wrote: On 04/20/2017 02:21 PM, Martin Kletzander wrote: We are currently parsing only rx_max_coalesced_frames because that's the only value that makes sense for us. The tun device just added support for this one and the others are only

Re: [libvirt] creating stream

2017-04-21 Thread Michal Privoznik
On 04/21/2017 12:12 PM, Vasiliy Tolstov wrote: 2017-04-20 21:14 GMT+03:00 Vasiliy Tolstov : I found , so i can decode all typed params to map[string]interface{} thanks! I'm try to add support for DomainOpenConsole and don't understand underline payload: https://gist.github.com/vtolstov/f8a0f8

Re: [libvirt] [PATCH] util: check ifa_addr pointer before accessing its elements

2017-04-21 Thread Michal Privoznik
On 04/21/2017 11:17 AM, Pavel Hrdina wrote: Reported by Rafał Wojciechowski . Thread 1 (Thread 0x7f194b99d700 (LWP 5631)): 0 virNetDevGetifaddrsAddress (addr=0x7f194b99c7c0, ifname=0x7f193400e2b0 "ovirtmgmt") at util/virnetdevip.c:738 1 virNetDevIPAddrGet (ifname=0x7f193400e2b0 "ovirtmgmt",

Re: [libvirt] creating stream

2017-04-21 Thread Vasiliy Tolstov
2017-04-20 21:14 GMT+03:00 Vasiliy Tolstov : > I found , so i can decode all typed params to map[string]interface{} thanks! I'm try to add support for DomainOpenConsole and don't understand underline payload: https://gist.github.com/vtolstov/f8a0f80de82100440b1c0e824436be5a I'm not handmade this

Re: [libvirt] [PATCH] Use port range 5901-5999 if not set in qemu.conf, avoid port 5900

2017-04-21 Thread Daniel P. Berrange
On Fri, Apr 21, 2017 at 11:43:52AM +0200, Christophe de Dinechin wrote: > > > BTW, if you really run 4K VMs on a single host, assigning one port per VM > for display will become a problem anyway. There are only 64K ports available, > so using 4K just for displays does not scale well, not even cou

Re: [libvirt] [PATCH] Use port range 5901-5999 if not set in qemu.conf, avoid port 5900

2017-04-21 Thread Christophe de Dinechin
> On 21 Apr 2017, at 11:26, Daniel P. Berrange wrote: > > On Fri, Apr 21, 2017 at 11:20:11AM +0200, Peter Krempa wrote: >> On Fri, Apr 21, 2017 at 11:02:36 +0200, Christophe de Dinechin wrote: >>> In order to avoid conflict with the default port (5900) for host VNC server >>> (vino-server for ex

Re: [libvirt] [PATCH] Use port range 5901-5999 if not set in qemu.conf, avoid port 5900

2017-04-21 Thread Daniel P. Berrange
On Fri, Apr 21, 2017 at 10:26:09AM +0100, Daniel P. Berrange wrote: > On Fri, Apr 21, 2017 at 11:20:11AM +0200, Peter Krempa wrote: > > On Fri, Apr 21, 2017 at 11:02:36 +0200, Christophe de Dinechin wrote: > > > In order to avoid conflict with the default port (5900) for host VNC > > > server > >

Re: [libvirt] [PATCH] Use port range 5901-5999 if not set in qemu.conf, avoid port 5900

2017-04-21 Thread Christophe de Dinechin
> On 21 Apr 2017, at 11:20, Peter Krempa wrote: > > On Fri, Apr 21, 2017 at 11:02:36 +0200, Christophe de Dinechin wrote: >> In order to avoid conflict with the default port (5900) for host VNC server >> (vino-server for example), or to conflict with X11 (starting at port 6000), >> restrict rang

Re: [libvirt] [PATCH] Use port range 5901-5999 if not set in qemu.conf, avoid port 5900

2017-04-21 Thread Daniel P. Berrange
On Fri, Apr 21, 2017 at 11:20:11AM +0200, Peter Krempa wrote: > On Fri, Apr 21, 2017 at 11:02:36 +0200, Christophe de Dinechin wrote: > > In order to avoid conflict with the default port (5900) for host VNC server > > (vino-server for example), or to conflict with X11 (starting at port 6000), > > r

Re: [libvirt] [PATCH] Use port range 5901-5999 if not set in qemu.conf, avoid port 5900

2017-04-21 Thread Peter Krempa
On Fri, Apr 21, 2017 at 11:02:36 +0200, Christophe de Dinechin wrote: > In order to avoid conflict with the default port (5900) for host VNC server > (vino-server for example), or to conflict with X11 (starting at port 6000), > restrict range of ports to 5901-5999 unless explicitly specified in qem

Re: [libvirt] [PATCH v2 0/3] Add support for coalesce settings on interfaces

2017-04-21 Thread Michal Privoznik
On 04/20/2017 02:21 PM, Martin Kletzander wrote: In linux this is supported since 4.11-rc3, I tested it with 4.11.0-rc5-next-20170407. The particular patch can be found here: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=e3e37e701713731b22f8cebfa1f5deed455cad8

Re: [libvirt] [PATCH v2 2/3] conf, docs: Add support for coalesce setting(s)

2017-04-21 Thread Michal Privoznik
On 04/20/2017 02:21 PM, Martin Kletzander wrote: We are currently parsing only rx_max_coalesced_frames because that's the only value that makes sense for us. The tun device just added support for this one and the others are only supported by hardware devices which we don't need to worry about as

[libvirt] [PATCH] util: check ifa_addr pointer before accessing its elements

2017-04-21 Thread Pavel Hrdina
Reported by Rafał Wojciechowski . Thread 1 (Thread 0x7f194b99d700 (LWP 5631)): 0 virNetDevGetifaddrsAddress (addr=0x7f194b99c7c0, ifname=0x7f193400e2b0 "ovirtmgmt") at util/virnetdevip.c:738 1 virNetDevIPAddrGet (ifname=0x7f193400e2b0 "ovirtmgmt", addr=addr@entry=0x7f194b99c7c0) at util/virnet

[libvirt] [PATCH] Use port range 5901-5999 if not set in qemu.conf, avoid port 5900

2017-04-21 Thread Christophe de Dinechin
In order to avoid conflict with the default port (5900) for host VNC server (vino-server for example), or to conflict with X11 (starting at port 6000), restrict range of ports to 5901-5999 unless explicitly specified in qemu.conf. On the other hand, if port range is explicitly specified in qemu.co

Re: [libvirt] How to get VM memory usage

2017-04-21 Thread Daniel P. Berrange
On Fri, Apr 21, 2017 at 09:58:12AM +0800, wangyuf...@cloudguarding.com wrote: > Hi Daniel, > > In method 'GetInfo', we can only get memory and max memory. However I > need to get used memory for calculating memory usage. The virsh command > 'dommemstat' can obtain used memory, is there a method in

Re: [libvirt] [PATCH] util: allow ignoring SIOCSIFHWADDR when errno is EPERM

2017-04-21 Thread Michal Privoznik
On 04/20/2017 11:26 PM, Laine Stump wrote: From: Laine Stump Commit f4ef3a71 made a variation of virNetDevSetMAC that would return without logging an error message if errno was set to EADDRNOTAVAIL. This errno is set by some SRIOV VF drivers (in particular igbvf) when they fail to set the devic

Re: [libvirt] [PATCH go-xml] Support for filesystem devices

2017-04-21 Thread Daniel P. Berrange
On Thu, Apr 20, 2017 at 09:56:59PM -0700, Ryan Goodfellow wrote: > Hi Folks, > > Any thoughts on this? This is my first time posting to this list, not sure > if I should direct the patch at someone in particular. Sorry for the delay, this is on my todo list to review... > > On Tue, Apr 18, 2017