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 919901BBA8 for ; Thu, 12 Apr 2018 09:40:41 +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 1D8734072CC4; Thu, 12 Apr 2018 07:40:41 +0000 (UTC) Received: from [10.36.112.36] (ovpn-112-36.ams2.redhat.com [10.36.112.36]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 23938215CDC6; Thu, 12 Apr 2018 07:40:39 +0000 (UTC) From: Maxime Coquelin To: "Chen, Junjie J" , "Tan, Jianfeng" , "mtetsuyah@gmail.com" Cc: "dev@dpdk.org" References: <1523443993-176139-1-git-send-email-junjie.j.chen@intel.com> <1523466152-181190-1-git-send-email-junjie.j.chen@intel.com> <75c33a22-9b4c-f293-07ee-daad99f3cad0@intel.com> <6288ba60-eebb-a743-aa1d-a61c32a07c58@redhat.com> <2c907472-444b-e8b6-2437-6fdcbcc21979@redhat.com> Message-ID: Date: Thu, 12 Apr 2018 09:40:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <2c907472-444b-e8b6-2437-6fdcbcc21979@redhat.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.7]); Thu, 12 Apr 2018 07:40:41 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 12 Apr 2018 07:40:41 +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 vhost invalid state 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: Thu, 12 Apr 2018 07:40:41 -0000 On 04/12/2018 09:35 AM, Maxime Coquelin wrote: > > > On 04/12/2018 09:34 AM, Chen, Junjie J wrote: >>> >>> >>> >>> On 04/12/2018 09:21 AM, Tan, Jianfeng wrote: >>>> >>>> >>>> On 4/12/2018 1:02 AM, Junjie Chen wrote: >>>>> dev_start sets *dev_attached* after setup queues, this sets device to >>>>> invalid state since no frontend is attached. Also destroy_device set >>>>> *started* to zero which makes *allow_queuing* always zero until >>>>> dev_start get called again. Actually, we should not determine queues >>>>> existence by >>>>> *dev_attached* but by queues pointers or other separated variable(s). >>>>> >>>>> Fixes: 30a701a53737 ("net/vhost: fix crash when creating vdev >>>>> dynamically") >>>>> >>>>> Signed-off-by: Junjie Chen >>>>> Tested-by: Jens Freimann >>>> >>>> Overall, looks great to me except a nit below. >>>> >>>> Reviewed-by: Jianfeng Tan >>> >>> Thanks Jianfeng, I can handle the small change while applying. >>> >>> Can you confirm that it is implied that the queue are already >>> allocated, else we >>> wouldn't find the internal resource and quit earlier (in case of >>> eth_dev_close >>> called twice for example)? >> >> That is required, otherwise it generate segfault if we close device >> before queue setup. For example we >> execute following steps in testpmd: >> 1. port attach >> 2. ctrl+D > > Thanks for confirming Junjie, I will apply it as is then. > > Reviewed-by: Maxime Coquelin > Applied to dpdk-next-virtio/master Thanks, Maxime