From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 4EF951B973 for ; Tue, 10 Apr 2018 10:11:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2018 01:11:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,431,1517904000"; d="scan'208";a="44934766" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 10 Apr 2018 01:11:38 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 10 Apr 2018 01:11:38 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 10 Apr 2018 01:11:37 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.115]) by shsmsx102.ccr.corp.intel.com ([169.254.2.184]) with mapi id 14.03.0319.002; Tue, 10 Apr 2018 16:11:35 +0800 From: "Chen, Junjie J" To: Jens Freimann CC: "Tan, Jianfeng" , "maxime.coquelin@redhat.com" , "mtetsuyah@gmail.com" , "dev@dpdk.org" , "Chen@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3] net/vhost: fix segfault when creating vdev dynamically Thread-Index: AQHTx/SwgF/Y4eCeKEiXgxwIwW7/S6P36ROAgAHNvfA= Date: Tue, 10 Apr 2018 08:11:35 +0000 Message-ID: References: <20180329153544.270488-1-junjie.j.chen@intel.com> <20180330065831.107558-1-junjie.j.chen@intel.com> <20180409123741.f6s4cjlofkvytch6@dhcp-192-241.str.redhat.com> In-Reply-To: <20180409123741.f6s4cjlofkvytch6@dhcp-192-241.str.redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDY1MThhNGYtYjkwZS00YzEzLWI5ZDItOTgyMmYwZDVhNDMzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiI1Z3NQdGNoOFp2ZGlaakR0WDBZM1ZBUHdHZnJvZ0V4XC9jTDFLdnRvZm0xXC9FbDFRRDFLd05NeVZnNVwvTDFVZ0FmIn0= x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Tue, 10 Apr 2018 08:11:41 -0000 Thanks for report, I just summited this patch to fix: https://dpdk.org/dev/patchwork/patch/37765/=20 >=20 > Hi, >=20 > 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. >=20 > for me, with this patch vhost enqueue/dequeue code is never called becaus= e >=20 > if (unlikely(rte_atomic32_read(&r->allow_queuing) =3D=3D 0)) >=20 > this check in eth_vhost_rx() is always true. >=20 > When I revert this patch it works as usual. >=20 > My testpmd cmdline is: >=20 > gdb --args $RTE_SDK/install/bin/testpmd -l 0,2,3,4,5 --socket-mem=3D1024 = -n 4 \ > --vdev 'net_vhost0,iface=3D/tmp/vhost-user1' \ > --vdev 'net_vhost1,iface=3D/tmp/vhost-user2' -- \ > --portmask=3Df --rxq=3D1 --txq=3D1 \ > --nb-cores=3D4 --forward-mode=3Dio -i >=20 > After starting testpmd I issue commands "set portlist 0,2,1,3", start my = guest > and start another testpmd issue in the guest. >=20 > 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 loo= p of > "VHOST CONFIG device not found" messages. >=20 >=20 > regards, > Jens