DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Chen, Junjie J" <junjie.j.chen@intel.com>
To: Jens Freimann <jfreimann@redhat.com>
Cc: "Tan, Jianfeng" <jianfeng.tan@intel.com>,
	"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"mtetsuyah@gmail.com" <mtetsuyah@gmail.com>,
	"dev@dpdk.org" <dev@dpdk.org>, "Chen@dpdk.org" <Chen@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3] net/vhost: fix segfault when creating vdev dynamically
Date: Tue, 10 Apr 2018 08:11:35 +0000	[thread overview]
Message-ID: <AA85A5A5E706C44BACB0BEFD5AC08BF6313C59DB@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20180409123741.f6s4cjlofkvytch6@dhcp-192-241.str.redhat.com>

Thanks for report, I just summited this patch to fix:
https://dpdk.org/dev/patchwork/patch/37765/ 

> 
> Hi,
> 
> On Fri, Mar 30, 2018 at 02:58:31PM +0800, Junjie Chen wrote:
> >When creating vdev dynamically, vhost pmd driver starts directly
> >without checking TX/RX queues are ready or not, and thus causes
> >segmentation fault when vhost library accesses queues. This patch adds
> >a flag to check whether queues are setup or not, and adds queues setup
> >into dev_start function to allow user to start them after setting up.
> 
> for me, with this patch vhost enqueue/dequeue code is never called because
> 
>   if (unlikely(rte_atomic32_read(&r->allow_queuing) == 0))
> 
> this check in eth_vhost_rx() is always true.
> 
> When I revert this patch it works as usual.
> 
> My testpmd cmdline is:
> 
> gdb --args $RTE_SDK/install/bin/testpmd -l 0,2,3,4,5 --socket-mem=1024 -n 4 \
>     --vdev 'net_vhost0,iface=/tmp/vhost-user1' \
>     --vdev 'net_vhost1,iface=/tmp/vhost-user2' -- \
>     --portmask=f  --rxq=1 --txq=1 \
>     --nb-cores=4 --forward-mode=io  -i
> 
> After starting testpmd I issue commands "set portlist 0,2,1,3", start my guest
> and start another testpmd issue in the guest.
> 
> Another problem I see: Before this patch I could start testpmd, issue the
> portlist command and type "start". If I do this now I get an infinite loop of
> "VHOST CONFIG device not found" messages.
> 
> 
> regards,
> Jens

      reply	other threads:[~2018-04-10  8:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27 16:05 [dpdk-dev] [PATCH] " Junjie Chen
2018-03-27  8:56 ` Tan, Jianfeng
2018-03-27  9:02   ` Chen, Junjie J
2018-03-27  9:10     ` Tan, Jianfeng
2018-03-27  9:24       ` Chen, Junjie J
2018-03-27  9:42         ` Tan, Jianfeng
2018-03-27 10:18           ` Chen, Junjie J
2018-03-27 13:54             ` Tan, Jianfeng
2018-03-27 11:28           ` Maxime Coquelin
2018-03-27 14:01             ` Tan, Jianfeng
2018-03-29 12:35               ` Maxime Coquelin
2018-03-29 15:35 ` [dpdk-dev] [PATCH v2] " Junjie Chen
2018-03-29 13:16   ` Maxime Coquelin
2018-03-30  6:58   ` [dpdk-dev] [PATCH v3] " Junjie Chen
2018-03-30  7:32     ` Yang, Zhiyong
2018-03-30  7:36       ` Maxime Coquelin
2018-03-30  7:35     ` Maxime Coquelin
2018-03-30  7:43     ` Maxime Coquelin
2018-04-09 12:37     ` Jens Freimann
2018-04-10  8:11       ` Chen, Junjie J [this message]

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=AA85A5A5E706C44BACB0BEFD5AC08BF6313C59DB@SHSMSX101.ccr.corp.intel.com \
    --to=junjie.j.chen@intel.com \
    --cc=Chen@dpdk.org \
    --cc=dev@dpdk.org \
    --cc=jfreimann@redhat.com \
    --cc=jianfeng.tan@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=mtetsuyah@gmail.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).