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 ADF604B4B for ; Fri, 30 Mar 2018 09:35:33 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 13B914068056; Fri, 30 Mar 2018 07:35:33 +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 1DC11215CDC6; Fri, 30 Mar 2018 07:35:29 +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: <5fae9b23-ab90-9dc0-56b6-999e639dac64@redhat.com> Date: Fri, 30 Mar 2018 09:35:28 +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.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 30 Mar 2018 07:35:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 30 Mar 2018 07:35:33 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.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:35:33 -0000 Hi Junjie, 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(-) Nice patch! Thanks for having handled the changes that quickly. Reviewed-by: Maxime Coquelin Maxime