From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by dpdk.org (Postfix) with ESMTP id 74920559C for ; Fri, 7 Aug 2015 16:06:39 +0200 (CEST) Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by goliath.siemens.de (8.15.1/8.15.1) with ESMTPS id t77E6c7a020836 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 7 Aug 2015 16:06:38 +0200 Received: from md1f2u6c.ww002.siemens.net ([139.25.68.37]) by mail2.siemens.de (8.15.1/8.15.1) with ESMTP id t77E6cOq001336 for ; Fri, 7 Aug 2015 16:06:38 +0200 Resent-From: Jan Kiszka Resent-To: dev@dpdk.org Resent-Date: Fri, 7 Aug 2015 16:06:37 +0200 Resent-Message-ID: <55C4BB6D.507@siemens.com> Resent-User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 To: , "Xie, Huawei" From: Jan Kiszka Message-ID: <55C4BAE6.6040408@siemens.com> Date: Fri, 7 Aug 2015 16:04:22 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Subject: [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: Fri, 07 Aug 2015 14:06:39 -0000 Hi, 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 least the case for QEMU and vhost-user mode (I suppose vhost-cuse is legacy now). And it really ruins the party when playing with this because every VM shutdown or guest reboot triggers. 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 == NULL). Do we simply need another hook in the vhost API, similar to the destruction notification? Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux