qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 08/24] vhost-user: return a read error


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH 08/24] vhost-user: return a read error
Date: Tue, 5 Jul 2016 01:35:45 +0300

On Mon, Jul 04, 2016 at 11:56:56PM +0200, Marc-André Lureau wrote:
> Hi
> 
> On Mon, Jul 4, 2016 at 5:47 PM, Michael S. Tsirkin <address@hidden> wrote:
> > Why does vhost_user_set_log_base need to return error?
> > If backend is not there to handle this message,
> > then it is not changing memory so it's ok to ignore the error.
> 
> How do you know it's not changing the memory?

either it closed socket intentionally or it exited
and kernel cleaned up.

> Furthermore, if the migration happened, it's because backend claim
> VHOST_F_LOG_ALL, thus it should really not fail

I don't see why - could you explain pls?

> > Same logic applies to many other messages.
> 
> Pretty much all messages, the error can't be ignored, or operations
> will just fail silentely randomly. I don't understand why vhost-user
> io error can be ignored. Also it's quite inconsistent the way the code
> is today, vhost_user_write() returns an error that is mostly ignored,
> while vhost_user_read() is checked. Why having an error later when you
> can report it earlier? I fail to understand the rationale of this
> error handling.

It's historical.  the way I see it, most errors due to disconnect
can be ignored except
maybe for the initial feature negotiation which is needed
so we know what to tell guest.

Errors due to e.g. buffer being full should cause an assert
as it's an internal qemu error.


> 
> -- 
> Marc-André Lureau



reply via email to

[Prev in Thread] Current Thread [Next in Thread]