DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tiwei Bie <tiwei.bie@intel.com>
To: Marvin Liu <yong.liu@intel.com>
Cc: dev@dpdk.org, maxime.coquelin@redhat.com, zhihong.wang@intel.com
Subject: Re: [dpdk-dev] [PATCH] examples/vhost: fix qemu abort
Date: Wed, 25 Jul 2018 09:23:51 +0800	[thread overview]
Message-ID: <20180725012350.GA20566@debian> (raw)
In-Reply-To: <20180724151649.44490-1-yong.liu@intel.com>

On Tue, Jul 24, 2018 at 11:16:49PM +0800, Marvin Liu wrote:
> When start vhost sample with builtin-net-driver argument, vhost feature
> bit will be zero. If VHOST_USER_F_PROTOCOL_FEATURES is not set, vhost
> net start will be failed in qemu. This occasion will cause device stop
> action was skipped. Consequently, same ioevent fd will be added second
> time after reload driver and then cause qemu abort. Add feature bit
> which has been supported by vhost library can fix this error.
> 
> Fixes: ca059fa5 ("examples/vhost: demonstrate the new generic APIs")

It's a bug in QEMU, this is a workaround in DPDK.
So there is no need to fix any commit in DPDK.

> 
> Signed-off-by: Marvin Liu <yong.liu@intel.com>
> 
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index 2175c1186..44aec2f47 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -1520,7 +1520,8 @@ main(int argc, char *argv[])
>  		}
>  
>  		if (builtin_net_driver)
> -			rte_vhost_driver_set_features(file, VIRTIO_NET_FEATURES);

There is no need to remove VIRTIO_NET_FEATURES
although it's defined to 0 (as it's helpful for
users to understand this example).

> +			rte_vhost_driver_set_features(file,
> +				1ULL << VHOST_USER_F_PROTOCOL_FEATURES);

It's better to add some comments that this is
a workaround and why this workaround is needed.

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

  reply	other threads:[~2018-07-25  1:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 15:16 Marvin Liu
2018-07-25  1:23 ` Tiwei Bie [this message]
2018-07-25  9:56 ` [dpdk-dev] [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 ` [dpdk-dev] [PATCH v3] " Marvin Liu
2018-07-25  6:39   ` Tiwei Bie
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=20180725012350.GA20566@debian \
    --to=tiwei.bie@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=yong.liu@intel.com \
    --cc=zhihong.wang@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 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).