Re: [PATCH v6 3/3] ivshmem: add check on protocol version in QEMU

2014-09-25 Thread David Marchand
that break things (user mixing and matching incompatible software). Ok, so how about keeping with this simple mechanism at the moment ? If this versionning system is too limited in the future, I think we will need a global rework on the protocol, anyway. -- David Marchand -- To unsubscribe

[PATCH v6 2/3] docs: update ivshmem device spec

2014-09-08 Thread David Marchand
Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and re-organise it. Signed-off-by: David Marchand david.march...@6wind.com

[PATCH v6 0/3] ivshmem: update documentation, add client/server tools

2014-09-08 Thread David Marchand
are ok. -- David Marchand David Marchand (3): contrib: add ivshmem client and server docs: update ivshmem device spec ivshmem: add check on protocol version in QEMU Makefile|8 + configure |3 + contrib/ivshmem-client

[PATCH v6 1/3] contrib: add ivshmem client and server

2014-09-08 Thread David Marchand
When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: Olivier Matz olivier.m...@6wind.com Signed-off-by: David Marchand david.march...@6wind.com

[PATCH v6 3/3] ivshmem: add check on protocol version in QEMU

2014-09-08 Thread David Marchand
-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c | 13 ++--- contrib/ivshmem-client/ivshmem-client.h |1 + contrib/ivshmem-server/ivshmem-server.c |9 + contrib/ivshmem-server/ivshmem-server.h |1 + docs/specs/ivshmem_device_spec.txt

Re: [PATCH v5 1/3] contrib: add ivshmem client and server

2014-09-05 Thread David Marchand
a better idea ? Thanks. -- David Marchand -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v5 3/3] ivshmem: add check on protocol version in QEMU

2014-09-05 Thread David Marchand
Hello Stefan, On 09/05/2014 12:29 PM, Stefan Hajnoczi wrote: On Thu, Sep 04, 2014 at 02:51:01PM +0200, David Marchand wrote: diff --git a/contrib/ivshmem-client/ivshmem-client.c b/contrib/ivshmem-client/ivshmem-client.c index ad210c8..0c4e016 100644 --- a/contrib/ivshmem-client/ivshmem

[PATCH v5 0/3] ivshmem: update documentation, add client/server tools

2014-09-04 Thread David Marchand
of irqfd support) and some parts of the ivshmem code clearly need cleanup. I will try to address this in future patches when these first patches are ok. -- David Marchand David Marchand (3): contrib: add ivshmem client and server docs: update ivshmem device spec ivshmem: add check on protocol

[PATCH v5 3/3] ivshmem: add check on protocol version in QEMU

2014-09-04 Thread David Marchand
-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c | 14 +++--- contrib/ivshmem-client/ivshmem-client.h |1 + contrib/ivshmem-server/ivshmem-server.c |7 + contrib/ivshmem-server/ivshmem-server.h |1 + docs/specs/ivshmem_device_spec.txt

[PATCH v5 1/3] contrib: add ivshmem client and server

2014-09-04 Thread David Marchand
When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: Olivier Matz olivier.m...@6wind.com Signed-off-by: David Marchand david.march...@6wind.com

[PATCH v5 2/3] docs: update ivshmem device spec

2014-09-04 Thread David Marchand
Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and re-organise it. Signed-off-by: David Marchand david.march...@6wind.com

Re: [PATCH v4 00/14] ivshmem: update documentation, add client/server tools

2014-09-03 Thread David Marchand
Hello Eric, On 09/02/2014 10:31 PM, Eric Blake wrote: On 09/02/2014 09:25 AM, David Marchand wrote: Here is a patchset containing an update on ivshmem specs documentation and importing ivshmem server and client tools. These tools have been written from scratch and are not related to what

[PATCH v4 00/14] ivshmem: update documentation, add client/server tools

2014-09-02 Thread David Marchand
art here). By the way, there are still some functionnalities that need description (use of ioeventfd, the lack of irqfd support) and some parts of the ivshmem code clearly need cleanup. I will try to address this in future patches when these first patches are ok. -- David Marchand David Marchand

[PATCH v4 06/14] contrib/ivshmem-server: set client sockets as non blocking

2014-09-02 Thread David Marchand
Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-server/ivshmem-server.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/ivshmem-server/ivshmem-server.c b/contrib/ivshmem-server/ivshmem-server.c index 0afa6e8..e0d4d1d 100644

[PATCH v4 04/14] contrib/ivshmem-*: reuse qemu/queue.h

2014-09-02 Thread David Marchand
Switch to qemu/queue.h strutures. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c | 17 contrib/ivshmem-client/ivshmem-client.h |7 --- contrib/ivshmem-server/ivshmem-server.c | 33

[PATCH v4 10/14] contrib/ivshmem-server: fix mem leak on error

2014-09-02 Thread David Marchand
Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-server/ivshmem-server.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ivshmem-server/ivshmem-server.c b/contrib/ivshmem-server/ivshmem-server.c index 15d468c..4732dab 100644 --- a/contrib

[PATCH v4 09/14] contrib/ivshmem-*: switch to g_malloc0/g_free

2014-09-02 Thread David Marchand
Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c |9 ++--- contrib/ivshmem-server/ivshmem-server.c | 12 ++-- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/contrib/ivshmem-client/ivshmem-client.c b/contrib

[PATCH v4 02/14] docs: update ivshmem device spec

2014-09-02 Thread David Marchand
Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and re-organise it. Signed-off-by: David Marchand david.march...@6wind.com

[PATCH v4 11/14] contrib/ivshmem-*: rework error handling

2014-09-02 Thread David Marchand
Following Gonglei comments, rework error handling using goto. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c | 17 - contrib/ivshmem-server/ivshmem-server.c | 19 ++- 2 files changed, 18 insertions(+), 18

[PATCH v4 12/14] contrib/ivshmem-*: various fixes

2014-09-02 Thread David Marchand
More fixes following Gonglei comments: - add a missing \n in a debug message. - add an explicit initialisation of sock_fd. - fix a check on vector index. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c |5 +++-- 1 file changed, 3 insertions

[PATCH v4 14/14] ivshmem: add check on protocol version in QEMU

2014-09-02 Thread David Marchand
-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c | 14 +++--- contrib/ivshmem-client/ivshmem-client.h |1 + contrib/ivshmem-server/ivshmem-server.c |7 + contrib/ivshmem-server/ivshmem-server.h |1 + docs/specs/ivshmem_device_spec.txt

[PATCH v4 03/14] contrib/ivshmem-*: comply with QEMU coding style

2014-09-02 Thread David Marchand
Fix coding style for structures. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c | 47 ++- contrib/ivshmem-client/ivshmem-client.h | 76 +++ contrib/ivshmem-client/main.c | 21

[PATCH v4 01/14] contrib: add ivshmem client and server

2014-09-02 Thread David Marchand
When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: Olivier Matz olivier.m...@6wind.com Signed-off-by: David Marchand david.march...@6wind.com

[PATCH v4 08/14] contrib/ivshmem-*: plug client and server in QEMU top Makefile

2014-09-02 Thread David Marchand
Signed-off-by: David Marchand david.march...@6wind.com --- Makefile|8 configure |3 +++ contrib/ivshmem-client/Makefile | 29 - contrib/ivshmem-server/Makefile | 29 - 4

[PATCH v4 07/14] contrib/ivshmem-*: add missing const and static attrs

2014-09-02 Thread David Marchand
Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/main.c |6 +++--- contrib/ivshmem-server/main.c |8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/contrib/ivshmem-client/main.c b/contrib/ivshmem-client/main.c index f8a7b66

[PATCH v4 13/14] contrib/ivshmem-server: align server default parameter values

2014-09-02 Thread David Marchand
ivshmem server should use the same default values as hw/misc/ivshmem. Update accordingly. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-server/main.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/ivshmem-server/main.c b/contrib

[PATCH v4 05/14] contrib/ivshmem-*: switch to QEMU headers

2014-09-02 Thread David Marchand
Reuse parsers from QEMU, C99 boolean. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/ivshmem-client.c | 12 + contrib/ivshmem-client/ivshmem-client.h |4 +- contrib/ivshmem-client/main.c | 12 + contrib/ivshmem-server/ivshmem-server.c

Re: [Qemu-devel] [PATCH v3 2/2] docs: update ivshmem device spec

2014-09-01 Thread David Marchand
On 08/28/2014 11:49 AM, Stefan Hajnoczi wrote: On Tue, Aug 26, 2014 at 01:04:30PM +0200, Paolo Bonzini wrote: Il 26/08/2014 08:47, David Marchand ha scritto: Using a version message supposes we want to keep ivshmem-server and QEMU separated (for example, in two distribution packages) while we

Re: [Qemu-devel] [PATCH v3 2/2] docs: update ivshmem device spec

2014-08-26 Thread David Marchand
Hello Stefan, On 08/08/2014 05:02 PM, Stefan Hajnoczi wrote: On Fri, Aug 08, 2014 at 10:55:18AM +0200, David Marchand wrote: +For each client (QEMU processes) that connects to the server: +- the server assigns an ID for this client and sends this ID to him as the first + message

Re: [Qemu-devel] [PATCH v3 1/2] contrib: add ivshmem client and server

2014-08-18 Thread David Marchand
On 08/08/2014 04:51 PM, Stefan Hajnoczi wrote: On Fri, Aug 08, 2014 at 10:55:17AM +0200, David Marchand wrote: Looks good, a few minor comments: diff --git a/contrib/ivshmem-client/Makefile b/contrib/ivshmem-client/Makefile new file mode 100644 index 000..eee97c6 --- /dev/null +++ b

Re: [Qemu-devel] [PATCH v3 1/2] contrib: add ivshmem client and server

2014-08-18 Thread David Marchand
) { +ret = -1; The ret's value will be covered when multi clients failed. Do we need store the failed status for server?. It indicates that we could not notify *all* clients. Thanks Gonglei. -- David Marchand -- To unsubscribe from this list: send the line unsubscribe kvm in the body

Re: [Qemu-devel] [PATCH v2 1/2] contrib: add ivshmem client and server

2014-08-08 Thread David Marchand
in the top-level directory. [...] Back from holidays, sorry for the late response. I will send a v3 for these issues. -- David Marchand -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http

[PATCH v3 0/2] ivshmem: update documentation, add client/server tools

2014-08-08 Thread David Marchand
description (use of ioeventfd, the lack of irqfd support) and some parts of the ivshmem code clearly need cleanup. I will try to address this in future patches when these first patches are ok. -- David Marchand David Marchand (2): contrib: add ivshmem client and server docs: update ivshmem device spec

[PATCH v3 1/2] contrib: add ivshmem client and server

2014-08-08 Thread David Marchand
When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: Olivier Matz olivier.m...@6wind.com Signed-off-by: David Marchand david.march...@6wind.com

[PATCH v3 2/2] docs: update ivshmem device spec

2014-08-08 Thread David Marchand
Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and re-organise it. Signed-off-by: David Marchand david.march...@6wind.com

Re: [PATCH v3 2/2] docs: update ivshmem device spec

2014-08-08 Thread David Marchand
Hello Claudio, On 08/08/2014 11:04 AM, Claudio Fontana wrote: On 08.08.2014 10:55, David Marchand wrote: Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some

Re: [Qemu-devel] [PATCH v3 0/2] ivshmem: update documentation, add client/server tools

2014-08-08 Thread David Marchand
is started by only specifying -S /path/to/ivshmem_socket. We made comments into the source code, so I am not sure what could be added. What do you miss ? -- David Marchand -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v2 1/2] contrib: add ivshmem client and server

2014-07-21 Thread David Marchand
Hello Eric, On 07/21/2014 04:21 PM, Eric Blake wrote: On 07/20/2014 03:38 AM, David Marchand wrote: +# Copyright 2014 6WIND S.A. +# All rights reserved This file has no other license, and is therefore incompatible with GPLv2. You'll need to resubmit under an appropriately open license

[PATCH v2 0/2] ivshmem: update documentation, add client/server tools

2014-07-20 Thread David Marchand
to address this in future patches when these first patches are ok. -- David Marchand David Marchand (2): contrib: add ivshmem client and server docs: update ivshmem device spec contrib/ivshmem-client/Makefile | 26 ++ contrib/ivshmem-client/ivshmem-client.c | 418

[PATCH v2 1/2] contrib: add ivshmem client and server

2014-07-20 Thread David Marchand
When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: Olivier Matz olivier.m...@6wind.com Signed-off-by: David Marchand david.march...@6wind.com

[PATCH v2 2/2] docs: update ivshmem device spec

2014-07-20 Thread David Marchand
Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and re-organise it. Signed-off-by: David Marchand david.march...@6wind.com

Re: [PATCH 1/2] docs: update ivshmem device spec

2014-06-25 Thread David Marchand
with a optional section is a good idea too. I will work on this at my return. Anyway, thanks for the review. -- David Marchand On 06/23/2014 04:18 PM, Claudio Fontana wrote: Hi, we were reading through this quickly today, and these are some of the questions that we think can came up when reading

[PATCH 0/2] ivshmem: update documentation, add client/server tools

2014-06-20 Thread David Marchand
put them in contrib/ directory as the qemu-doc.texi was already telling the server was supposed to be there. -- David Marchand David Marchand (2): docs: update ivshmem device spec contrib: add ivshmem client and server contrib/ivshmem-client/Makefile | 26 ++ contrib/ivshmem-client

[PATCH 2/2] contrib: add ivshmem client and server

2014-06-20 Thread David Marchand
When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: David Marchand david.march...@6wind.com --- contrib/ivshmem-client/Makefile | 26

[PATCH 1/2] docs: update ivshmem device spec

2014-06-20 Thread David Marchand
Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Signed-off-by: David Marchand david.march...@6wind.com --- docs/specs/ivshmem_device_spec.txt | 41

Re: [Qemu-devel] Why I advise against using ivshmem

2014-06-19 Thread David Marchand
server, yes I will look at it. I will see what I can propose or if importing nahanni implementation as-is is the best solution. Anyway, first, documentation. -- David Marchand -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

Re: [Qemu-devel] Why I advise against using ivshmem

2014-06-18 Thread David Marchand
will review it. Please also see the bug fixes in the following unapplied patch: [PATCH] ivshmem: fix potential OOB r/w access (#2) by Sebastian Krahmer https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg03538.html Thanks for the pointer. I'll check it. -- David Marchand -- To unsubscribe from

Re: [Qemu-devel] Why I advise against using ivshmem

2014-06-18 Thread David Marchand
networking APIs. If you have access to source code, this should not be a problem. -- David Marchand -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [Qemu-devel] Why I advise against using ivshmem

2014-06-17 Thread David Marchand
inside the guest. Actually, you can avoid this memory copy using frameworks like DPDK. Unless someone steps up and maintains ivshmem, I think it should be deprecated and dropped from QEMU. Then I can maintain ivshmem for QEMU. If this is ok, I will send a patch for MAINTAINERS file. -- David