DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Liu, Yong" <yong.liu@intel.com>
To: "Bie, Tiwei" <tiwei.bie@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] examples/vhost: workaround qemu abort
Date: Wed, 25 Jul 2018 02:42:43 +0000	[thread overview]
Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E630FFB90@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20180725021851.GA30497@debian>



> -----Original Message-----
> From: Bie, Tiwei
> Sent: Wednesday, July 25, 2018 10:19 AM
> To: Liu, Yong <yong.liu@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [PATCH v2] examples/vhost: workaround qemu abort
> 
> On Wed, Jul 25, 2018 at 05:56:54PM +0800, Marvin Liu wrote:
> > Current qemu vhost net ring start has a dependency on feature bit
> > VHOST_USER_F_PROTOCOL_FEATURES. If vhost device start without it, stop
> > action will be skipped. Consequently, same ioevent fd will be added
> > twice after reloading driver and then cause qemu abort. However, ring
> > should be initialized in an enabled state when this feature bit not
> > negotiated. Work around qemu issue by enabling this 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..4b87331fc 100644
> > --- a/examples/vhost/main.c
> > +++ b/examples/vhost/main.c
> > @@ -1519,8 +1519,12 @@ main(int argc, char *argv[])
> >  				"vhost driver register failure.\n");
> >  		}
> >
> > -		if (builtin_net_driver)
> > +		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,
> > +				1ULL << VHOST_USER_F_PROTOCOL_FEATURES);
> 
> rte_vhost_driver_set_features() will overwrite the
> existing value. You need to OR VIRTIO_NET_FEATURES
> and (1ULL << VHOST_USER_F_PROTOCOL_FEATURES).
> 
> 

Tiwei,
Thanks for point out the error, I have sent v3 for correcting this.

Regards,
Marvin
> 
> > +		}
> >
> >  		if (mergeable == 0) {
> >  			rte_vhost_driver_disable_features(file,
> > --
> > 2.17.0
> >

  reply	other threads:[~2018-07-25  2:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 15:16 [dpdk-dev] [PATCH] examples/vhost: fix " Marvin Liu
2018-07-25  1:23 ` Tiwei Bie
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 [this message]
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=86228AFD5BCD8E4EBFD2B90117B5E81E630FFB90@SHSMSX103.ccr.corp.intel.com \
    --to=yong.liu@intel.com \
    --cc=dev@dpdk.org \
    --cc=tiwei.bie@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).