Received: from eggs.gnu.org ([2001:4830:134:3::10]:48245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK65G-0001l8-20 for qemu-devel@nongnu.org; Mon, 04 Jul 2016 11:46:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bK65C-0004YI-So for qemu-devel@nongnu.org; Mon, 04 Jul 2016 11:46:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK65C-0004YD-Mh for qemu-devel@nongnu.org; Mon, 04 Jul 2016 11:46:50 -0400 Date: Mon, 4 Jul 2016 18:46:46 +0300 From: "Michael S. Tsirkin" Message-ID: <20160704184410-mutt-send-email-mst@redhat.com> References: <1466503372-28334-1-git-send-email-marcandre.lureau@redhat.com> <1466503372-28334-7-git-send-email-marcandre.lureau@redhat.com> <20160623072717-mutt-send-email-mst@redhat.com> <395281151.1343677.1466673378323.JavaMail.zimbra@redhat.com> <20160623200402-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 06/24] vhost-user: check vhost_user_write() return value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Marc-Andr=E9?= Lureau Cc: yuanhan liu , Victor Kaplansky , QEMU , jonshin@cisco.com, Tetsuya Mukawa On Fri, Jun 24, 2016 at 02:49:22PM +0200, Marc-Andr=E9 Lureau wrote: > Hi >=20 > On Thu, Jun 23, 2016 at 7:08 PM, Michael S. Tsirkin wr= ote: > >> > >> Callers do not always ignore it (and in general it should not, shoul= d it?), this helps breaking the execution at right moment, help debugging= , code consistency, good practices etc (perhaps it's too obvious to me an= d I am missing something?) > > > > Reporting error up the stack is helpful if it's handled in some way. > > If we just keep guest going on this error, then we could > > maybe log it for debug build but that's all. >=20 > Reporting up to guest somehow would be a good thing at some point, I'm not so sure. If backend will reconnect shortly, we can handle everything transparently. > so > I think we should start from the bottom. vhost-user lacks error > handling, let's add it. >=20 > Regarding debug build messages, I don't think it's enough. As long as > we don't have an official supported way to handle disconnect. It's > better to report an error than be silent. Let's just work on handling it. If we need debug messages to help us reach that goal fine. But I don't see many reasons to propagate return codes back and forth if caller just prints and ignores it. Print it where it's detected :) >=20 > --=20 > Marc-Andr=E9 Lureau