From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 84B4D3237 for ; Sat, 8 Aug 2015 02:04:55 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 07 Aug 2015 17:04:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,632,1432623600"; d="scan'208";a="538035840" Received: from pgsmsx105.gar.corp.intel.com ([10.221.44.96]) by FMSMGA003.fm.intel.com with ESMTP; 07 Aug 2015 17:04:53 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX105.gar.corp.intel.com (10.221.44.96) with Microsoft SMTP Server (TLS) id 14.3.224.2; Sat, 8 Aug 2015 08:04:52 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.126]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.188]) with mapi id 14.03.0224.002; Sat, 8 Aug 2015 08:04:50 +0800 From: "Ouyang, Changchun" To: Jan Kiszka , "dev@dpdk.org" , "Xie, Huawei" Thread-Topic: [dpdk-dev] vhost: Problem RESET_OWNER processing Thread-Index: AQHQ0RpYP9X45FzH/EmMhNjQ9xwa6J4BOLQg Date: Sat, 8 Aug 2015 00:04:49 +0000 Message-ID: References: <55C4BAE6.6040408@siemens.com> In-Reply-To: <55C4BAE6.6040408@siemens.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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] vhost: Problem RESET_OWNER processing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Aug 2015 00:04:56 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jan Kiszka > Sent: Friday, August 7, 2015 10:04 PM > To: dev@dpdk.org; Xie, Huawei > Subject: [dpdk-dev] vhost: Problem RESET_OWNER processing >=20 > Hi, >=20 > I was wondering if I'm alone with this: the vhost-switch example crashes = on > client disconnects if the client send a RESET_OWNER message. That's at le= ast > the case for QEMU and vhost-user mode (I suppose vhost-cuse is legacy What's your qemu version? > now). And it really ruins the party when playing with this because every = VM > shutdown or guest reboot triggers. >=20 > I was looking deeper in the librte_vhost, and I found that reset_owner() = is > doing cleanup_device and then init_device - but without letting the user > know. So vhost-switch crashed in its main loop over continuing to use the > device, namely calling rte_vhost_dequeue_burst (with > dev->virtqueue[]->avail =3D=3D NULL). >=20 > Do we simply need another hook in the vhost API, similar to the destructi= on > notification? >=20 > Jan >=20 > -- > Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate > Competence Center Embedded Linux