From: "Michael S. Tsirkin" <mst@redhat.com>
To: David Marchand <david.marchand@6wind.com>
Cc: Olivier Matz <olivier.matz@6wind.com>,
kvm@vger.kernel.org, stefanha@gmail.com,
claudio.fontana@huawei.com, qemu-devel@nongnu.org,
armbru@redhat.com, arei.gonglei@huawei.com, mkletzan@redhat.com,
pbonzini@redhat.com, jani.kokkonen@huawei.com,
cam@cs.ualberta.ca
Subject: Re: [Qemu-devel] [PATCH v6 1/3] contrib: add ivshmem client and server
Date: Mon, 8 Sep 2014 12:51:11 +0300 [thread overview]
Message-ID: <20140908095111.GC457@redhat.com> (raw)
In-Reply-To: <1410167870-680-2-git-send-email-david.marchand@6wind.com>
On Mon, Sep 08, 2014 at 11:17:48AM +0200, David Marchand wrote:
...
> diff --git a/configure b/configure
> index 961bf6f..a41a16c 100755
> --- a/configure
> +++ b/configure
> @@ -4125,6 +4125,9 @@ if test "$want_tools" = "yes" ; then
> if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
> tools="qemu-nbd\$(EXESUF) $tools"
> fi
> + if [ "$kvm" = "yes" ] ; then
> + tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools"
> + fi
Why are you tying this to kvm btw?
Shouldn't be for any linux host?
> fi
> if test "$softmmu" = yes ; then
> if test "$virtfs" != no ; then
...
> diff --git a/contrib/ivshmem-client/ivshmem-client.h b/contrib/ivshmem-client/ivshmem-client.h
> new file mode 100644
> index 0000000..284c4a3
> --- /dev/null
> +++ b/contrib/ivshmem-client/ivshmem-client.h
> @@ -0,0 +1,212 @@
> +/*
> + * Copyright 6WIND S.A., 2014
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2 or
> + * (at your option) any later version. See the COPYING file in the
> + * top-level directory.
> + */
> +
> +#ifndef _IVSHMEM_CLIENT_H_
> +#define _IVSHMEM_CLIENT_H_
> +
> +/**
> + * This file provides helper to implement an ivshmem client. It is used
> + * on the host to ask QEMU to send an interrupt to an ivshmem PCI device in a
> + * guest. QEMU also implements an ivshmem client similar to this one, they both
> + * connect to an ivshmem server.
> + *
> + * A standalone ivshmem client based on this file is provided for debug/test
> + * purposes.
> + */
> +
> +#include <limits.h>
> +#include <sys/select.h>
> +
> +#include "qemu/queue.h"
> +
> +/**
> + * Maximum number of notification vectors supported by the client
> + */
> +#define IVSHMEM_CLIENT_MAX_VECTORS 64
> +
> +/**
> + * Structure storing a peer
> + *
> + * Each time a client connects to an ivshmem server, it is advertised to
> + * all connected clients through the unix socket. When our ivshmem
> + * client receives a notification, it creates a IvshmemClientPeer
> + * structure to store the infos of this peer.
> + *
> + * This structure is also used to store the information of our own
> + * client in (IvshmemClient)->local.
> + */
> +typedef struct IvshmemClientPeer {
> + QTAILQ_ENTRY(IvshmemClientPeer) next; /**< next in list*/
Needs space before */
> + long id; /**< the id of the peer */
> + int vectors[IVSHMEM_CLIENT_MAX_VECTORS]; /**< one fd per vector */
> + unsigned vectors_count; /**< number of vectors */
I would do just /* text */ here, otherewise people might think
they have to copy this comment style.
> +} IvshmemClientPeer;
an empty line wouldn't hurt here.
> +QTAILQ_HEAD(IvshmemClientPeerList, IvshmemClientPeer);
> +
> +typedef struct IvshmemClientPeerList IvshmemClientPeerList;
> +typedef struct IvshmemClient IvshmemClient;
> +
next prev parent reply other threads:[~2014-09-08 9:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-08 9:17 [Qemu-devel] [PATCH v6 0/3] ivshmem: update documentation, add client/server tools David Marchand
2014-09-08 9:17 ` [Qemu-devel] [PATCH v6 1/3] contrib: add ivshmem client and server David Marchand
2014-09-08 9:51 ` Michael S. Tsirkin [this message]
2014-09-08 9:17 ` [Qemu-devel] [PATCH v6 2/3] docs: update ivshmem device spec David Marchand
2014-09-08 10:01 ` Michael S. Tsirkin
2014-09-08 9:17 ` [Qemu-devel] [PATCH v6 3/3] ivshmem: add check on protocol version in QEMU David Marchand
2014-09-08 9:49 ` Michael S. Tsirkin
2014-09-23 15:58 ` Stefan Hajnoczi
2014-09-25 8:38 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140908095111.GC457@redhat.com \
--to=mst@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=armbru@redhat.com \
--cc=cam@cs.ualberta.ca \
--cc=claudio.fontana@huawei.com \
--cc=david.marchand@6wind.com \
--cc=jani.kokkonen@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=mkletzan@redhat.com \
--cc=olivier.matz@6wind.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).