From: "Michael S. Tsirkin" <mst@redhat.com>
To: Marcel Apfelbaum <marcel@redhat.com>
Cc: jasowang@redhat.com, famz@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH V2 1/2] vhost-user: sync backend features
Date: Thu, 30 Jul 2015 09:47:03 +0300 [thread overview]
Message-ID: <20150730094612-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1438200409-27381-2-git-send-email-marcel@redhat.com>
On Wed, Jul 29, 2015 at 11:06:48PM +0300, Marcel Apfelbaum wrote:
> Complete vhost-user negotiation by syncing
synching.
> the features
> supported by the backend.
>
> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
> ---
> hw/virtio/vhost-user.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> index c4428a1..b522437 100644
> --- a/hw/virtio/vhost-user.c
> +++ b/hw/virtio/vhost-user.c
> @@ -22,6 +22,7 @@
> #include <sys/socket.h>
> #include <sys/un.h>
> #include <linux/vhost.h>
> +#include <linux/virtio_net.h>
>
> #define VHOST_MEMORY_MAX_NREGIONS 8
>
> @@ -358,6 +359,22 @@ static int vhost_user_init(struct vhost_dev *dev, void *opaque)
> return err;
> }
>
> + if (__virtio_has_feature(msg.u64, VIRTIO_F_ANY_LAYOUT)) {
> + dev->backend_features |= 1ULL << VIRTIO_F_ANY_LAYOUT;
> + }
> +
> + if (__virtio_has_feature(msg.u64, VIRTIO_F_VERSION_1)) {
> + dev->backend_features |= 1ULL << VIRTIO_F_VERSION_1;
> + }
> +
> + if (__virtio_has_feature(msg.u64, VIRTIO_NET_F_MRG_RXBUF)) {
> + dev->backend_features |= 1ULL << VIRTIO_NET_F_MRG_RXBUF;
> + }
> +
> + if (__virtio_has_feature(msg.u64, VIRTIO_NET_F_MQ)) {
> + dev->backend_features |= 1ULL << VIRTIO_NET_F_MQ;
> + }
> +
A bit too early for MQ, isn't it?
> if (__virtio_has_feature(msg.u64, VHOST_USER_F_PROTOCOL_FEATURES)) {
> dev->backend_features |= 1ULL << VHOST_USER_F_PROTOCOL_FEATURES;
>
> --
> 2.1.0
next prev parent reply other threads:[~2015-07-30 6:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 20:06 [Qemu-devel] [PATCH V2 0/2] vhost-user: sync backend Marcel Apfelbaum
2015-07-29 20:06 ` [Qemu-devel] [PATCH V2 1/2] vhost-user: sync backend features Marcel Apfelbaum
2015-07-30 6:47 ` Michael S. Tsirkin [this message]
2015-07-30 7:27 ` Marcel Apfelbaum
2015-07-29 20:06 ` [Qemu-devel] [PATCH V2 2/2] tests/vhost-user: check vhost-user feature negotiation Marcel Apfelbaum
2015-07-30 6:47 ` Michael S. Tsirkin
2015-07-30 7:30 ` Marcel Apfelbaum
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=20150730094612-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=famz@redhat.com \
--cc=jasowang@redhat.com \
--cc=marcel@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.