From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 57B9D4CBB for ; Tue, 27 Mar 2018 11:11:00 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2018 02:10:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,366,1517904000"; d="scan'208";a="215209657" Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.67.64.71]) ([10.67.64.71]) by fmsmga005.fm.intel.com with ESMTP; 27 Mar 2018 02:10:58 -0700 To: "Chen, Junjie J" , "maxime.coquelin@redhat.com" , "mtetsuyah@gmail.com" References: <1522166726-42025-1-git-send-email-junjie.j.chen@intel.com> Cc: "dev@dpdk.org" From: "Tan, Jianfeng" Message-ID: <20388d18-796f-7dd5-e596-f8cc290063d0@intel.com> Date: Tue, 27 Mar 2018 17:10:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] 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: Tue, 27 Mar 2018 09:11:01 -0000 On 3/27/2018 5:02 PM, Chen, Junjie J wrote: > Hi Jianfeng > >> On 3/28/2018 12:05 AM, Junjie Chen wrote: >>> when creating vdev dynamically, vhost pmd driver start directly >>> without checking TX/RX queues ready or not, and thus cause >>> segmentation fault when vhost library accessing queues. This patch add >>> flag to check whether queues setup or not, and add driver start call >>> into dev_start to allow user start it after setting up queue. >> The issue is clear now. But this patch just puts the situation before below fix: >> "it doesn't create the actual datagram socket until you call .dev_start()." > No, if the queue exist, the datagram socket still get created in vhost_create API, since the vhost_driver_register still exist in vhost_create. The queue can never be created, as it's still not probed.