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 1492A2C12 for ; Fri, 30 Mar 2018 09:43:41 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81BE18182D27; Fri, 30 Mar 2018 07:43:41 +0000 (UTC) Received: from [10.36.112.32] (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8BD581C710; Fri, 30 Mar 2018 07:43:40 +0000 (UTC) To: Junjie Chen , jianfeng.tan@intel.com, mtetsuyah@gmail.com Cc: dev@dpdk.org References: <20180329153544.270488-1-junjie.j.chen@intel.com> <20180330065831.107558-1-junjie.j.chen@intel.com> From: Maxime Coquelin Message-ID: <6da27c1b-c405-0176-64df-54a347d09339@redhat.com> Date: Fri, 30 Mar 2018 09:43:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180330065831.107558-1-junjie.j.chen@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 30 Mar 2018 07:43:41 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 30 Mar 2018 07:43:41 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@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: Fri, 30 Mar 2018 07:43:42 -0000 On 03/30/2018 08:58 AM, 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. > > Fixes: aed0b12930b3 ("net/vhost: fix socket file deleted on stop") > Signed-off-by: Chen, Junjie > --- > Changes in v3: > - Update commit log, refine duplicated code > Changes in v2: > - Check queues status in new_device, create queue in dev_start if not setup yet > > drivers/net/vhost/rte_eth_vhost.c | 69 ++++++++++++++++++++++++++------------- > 1 file changed, 46 insertions(+), 23 deletions(-) Applied to dpdk-next-virtio/master. Thanks! Maxime