From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 151361B7F4 for ; Mon, 9 Apr 2018 14:37:43 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7B9714067EF0; Mon, 9 Apr 2018 12:37:42 +0000 (UTC) Received: from localhost (dhcp-192-241.str.redhat.com [10.33.192.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2FEEC202699A; Mon, 9 Apr 2018 12:37:42 +0000 (UTC) Date: Mon, 9 Apr 2018 14:37:41 +0200 From: Jens Freimann To: Junjie Chen Cc: jianfeng.tan@intel.com, maxime.coquelin@redhat.com, mtetsuyah@gmail.com, dev@dpdk.org, Chen@dpdk.org Message-ID: <20180409123741.f6s4cjlofkvytch6@dhcp-192-241.str.redhat.com> References: <20180329153544.270488-1-junjie.j.chen@intel.com> <20180330065831.107558-1-junjie.j.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20180330065831.107558-1-junjie.j.chen@intel.com> User-Agent: NeoMutt/20180223 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 09 Apr 2018 12:37:42 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 09 Apr 2018 12:37:42 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jfreimann@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [PATCH v3] net/vhost: fix segfault when creating vdev dynamically X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Apr 2018 12:37:43 -0000 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