[dpdk-dev] [PATCH] rte_vhost: do not treat empty socket message as error

Tiwei Bie tiwei.bie at intel.com
Wed Feb 5 06:08:15 CET 2020


[PATCH] rte_vhost: do not treat empty socket message as error

s/rte_vhost:/vhost:/

On Thu, Jan 30, 2020 at 09:05:39AM +0100, Vitaliy Mysak wrote:
> According to recvmsg() specification, 0 is a valid
> return code when client is disconnecting.
> Therefore, it should not be reported as error, unless there
> are other dependencies that require message to not be empty.
> But there are none, since the next immediate caller of recvmsg()
> reports "vhost peer closed" info (not error) when message is empty.
> 
> This patch changes return code check for recvmsg() so that
> misleading error message is not printed when the code is 0.

Fixes: 8f972312b8f4 ("vhost: support vhost-user")
Cc: stable at dpdk.org

> 
> Signed-off-by: Vitaliy Mysak <vitaliy.mysak at intel.com>
> ---
>  lib/librte_vhost/socket.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>

Thanks,
Tiwei


More information about the dev mailing list