All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tiwei Bie <tiwei.bie@intel.com>
To: Marvin Liu <yong.liu@intel.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH v3] examples/vhost: workaround qemu abort
Date: Wed, 25 Jul 2018 14:39:29 +0800	[thread overview]
Message-ID: <20180725063929.GA12443@debian> (raw)
In-Reply-To: <20180725102556.68604-1-yong.liu@intel.com>

On Wed, Jul 25, 2018 at 06:25:56PM +0800, Marvin Liu wrote:
> Current qemu vhost net ring start has a dependency on feature bit
> VHOST_USER_F_PROTOCOL_FEATURES. Without this feature, vhost ring can't
> enabled and ioevent fd won't be deleted after vhost device stop. That
> will cause qemu abort when reloading driver. Work around qemu issues by
> enabling feature bit in vhost user backend.
> 
> Signed-off-by: Marvin Liu <yong.liu@intel.com>
> 
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index 2175c1186..8573004dd 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -1520,7 +1520,10 @@ main(int argc, char *argv[])
>  		}
>  
>  		if (builtin_net_driver)
> -			rte_vhost_driver_set_features(file, VIRTIO_NET_FEATURES);
> +			/* Workaround for qemu vhost net device startup */
> +			rte_vhost_driver_set_features(file,
> +				VIRTIO_NET_FEATURES |
> +				1ULL << VHOST_USER_F_PROTOCOL_FEATURES);

I have taken a closer look. I think it's not really right
to just offer this bit like this. Because once this bit is
negotiated, QEMU will ask the builtin_net_driver for the
protocol features it supports. Currently, there is no API
to allow external backends like the builtin_net_driver in
this example to set the protocol features it supports, and
instead, the protocol features VHOST_USER_PROTOCOL_FEATURES
defined in librte_vhost will be returned to QEMU. This will
cause problems because the builtin_net_driver doesn't really
support those protocol features.


>  
>  		if (mergeable == 0) {
>  			rte_vhost_driver_disable_features(file,
> -- 
> 2.17.0
> 

  reply	other threads:[~2018-07-25  6:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 15:16 [PATCH] examples/vhost: fix qemu abort Marvin Liu
2018-07-25  1:23 ` Tiwei Bie
2018-07-25  9:56 ` [PATCH v2] examples/vhost: workaround " Marvin Liu
2018-07-25  2:18   ` Tiwei Bie
2018-07-25  2:42     ` Liu, Yong
2018-07-25 10:25 ` [PATCH v3] " Marvin Liu
2018-07-25  6:39   ` Tiwei Bie [this message]
2018-07-26  5:42     ` Liu, Yong

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=20180725063929.GA12443@debian \
    --to=tiwei.bie@intel.com \
    --cc=dev@dpdk.org \
    --cc=yong.liu@intel.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.