All of lore.kernel.org
 help / color / mirror / Atom feed
From: l@dorileo.org
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Cc: haifeng.lin@huawei.com, mst@redhat.com, thibaut.collet@6wind.com,
	jasowang@redhat.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 6/9] vhost: use variable arguments for	vhost_call()
Date: Fri, 31 Jul 2015 23:47:31 -0300	[thread overview]
Message-ID: <87pp37g1x8.fsf@dorileo.org> (raw)
In-Reply-To: <1438105003-29501-7-git-send-email-marcandre.lureau@redhat.com>

Marc-André Lureau <marcandre.lureau@redhat.com> writes:

Hi André,

> It is useful to pass extra arguments to the funtions, for
> various backend needs.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  hw/virtio/vhost-backend.c         | 4 ++--
>  hw/virtio/vhost-user.c            | 4 ++--
>  include/hw/virtio/vhost-backend.h | 6 ++++--
>  3 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c
> index 4d68a27..7255089 100644
> --- a/hw/virtio/vhost-backend.c
> +++ b/hw/virtio/vhost-backend.c
> @@ -14,8 +14,8 @@
>  
>  #include <sys/ioctl.h>
>  
> -static int vhost_kernel_call(struct vhost_dev *dev, unsigned long int request,
> -                             void *arg)
> +static int vhost_kernel_call(struct vhost_dev *dev,
> +                             unsigned long int request, void *arg, ...)



I Couldn't see in your set where you change vhost_kernel_call() implementation or
make any use of this change.

Regards...

-- 
Leandro Dorileo


>  {
>      int fd = (uintptr_t) dev->opaque;
>  
> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> index 4993b63..8b6d7e7 100644
> --- a/hw/virtio/vhost-user.c
> +++ b/hw/virtio/vhost-user.c
> @@ -190,8 +190,8 @@ static int vhost_user_write(struct vhost_dev *dev, VhostUserMsg *msg,
>              0 : -1;
>  }
>  
> -static int vhost_user_call(struct vhost_dev *dev, unsigned long int request,
> -        void *arg)
> +static int vhost_user_call(struct vhost_dev *dev,
> +                           unsigned long int request, void *arg, ...)
>  {
>      VhostUserMsg msg;
>      VhostUserRequest msg_request;
> diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h
> index e472f29..36fa0f7 100644
> --- a/include/hw/virtio/vhost-backend.h
> +++ b/include/hw/virtio/vhost-backend.h
> @@ -11,6 +11,8 @@
>  #ifndef VHOST_BACKEND_H_
>  #define VHOST_BACKEND_H_
>  
> +#include <stdarg.h>
> +
>  typedef enum VhostBackendType {
>      VHOST_BACKEND_TYPE_NONE = 0,
>      VHOST_BACKEND_TYPE_KERNEL = 1,
> @@ -20,8 +22,8 @@ typedef enum VhostBackendType {
>  
>  struct vhost_dev;
>  
> -typedef int (*vhost_call)(struct vhost_dev *dev, unsigned long int request,
> -             void *arg);
> +typedef int (*vhost_call)(struct vhost_dev *dev,
> +                          unsigned long int request, void *arg, ...);
>  typedef int (*vhost_backend_init)(struct vhost_dev *dev, void *opaque);
>  typedef int (*vhost_backend_cleanup)(struct vhost_dev *dev);
>  
> -- 
> 2.4.3
>
>

  reply	other threads:[~2015-08-01  2:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28 17:36 [Qemu-devel] [PATCH v2 0/9] vhost-user: add migration log support (for 2.5) Marc-André Lureau
2015-07-28 17:36 ` [Qemu-devel] [PATCH v2 1/9] configure: probe for memfd Marc-André Lureau
2015-07-28 17:36 ` [Qemu-devel] [PATCH v2 2/9] posix: add linux-only memfd fallback Marc-André Lureau
2015-08-03 11:31   ` Marc-André Lureau
2015-07-28 17:36 ` [Qemu-devel] [PATCH v2 3/9] osdep: add memfd helpers Marc-André Lureau
2015-08-03 11:32   ` Marc-André Lureau
2015-07-28 17:36 ` [Qemu-devel] [PATCH v2 4/9] vhost: alloc shareable log Marc-André Lureau
2015-07-29 16:53   ` Dr. David Alan Gilbert
2015-07-29 17:04     ` Marc-André Lureau
2015-07-29 17:08       ` Dr. David Alan Gilbert
2015-07-29 17:22       ` Michael S. Tsirkin
2015-07-28 17:36 ` [Qemu-devel] [PATCH v2 5/9] vhost: document log resizing Marc-André Lureau
2015-07-28 17:36 ` [Qemu-devel] [PATCH v2 6/9] vhost: use variable arguments for vhost_call() Marc-André Lureau
2015-08-01  2:47   ` l [this message]
2015-08-03 11:03     ` Marc-André Lureau
2015-07-28 17:36 ` [Qemu-devel] [PATCH v2 7/9] vhost-user: start and end the va_list Marc-André Lureau
2015-07-28 17:36 ` [Qemu-devel] [PATCH v2 8/9] vhost-user: send log shm fd along with log_base Marc-André Lureau
2015-07-28 17:36 ` [Qemu-devel] [PATCH v2 9/9] vhost-user: document migration log Marc-André Lureau

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=87pp37g1x8.fsf@dorileo.org \
    --to=l@dorileo.org \
    --cc=haifeng.lin@huawei.com \
    --cc=jasowang@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thibaut.collet@6wind.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.