From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 449DBA054C for ; Fri, 14 Feb 2020 18:05:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D317F72; Fri, 14 Feb 2020 18:05:59 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 347F31B53 for ; Fri, 14 Feb 2020 18:05:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581699957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2SfMKRbSLjXhx539toRUf1/2bSgV6sRf1j5O/B/cKjw=; b=iVXYcFXFmnnikVfd+8lTVCUqFNNFyDRfVRlubeI0bBG3tre6/tjsNMgfxxo25aF5EbM/vQ cfASlEz8Rogv+IKi0DYR9G0rwjQVvL4G2AC4QRiDgDkIXzledLBFqK17YO5PKQw7Aqo+gl cdhjfttonP7Pa2BSZ2Mfy+UUQCZEIh8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-119-iWPWhacRM7SxRYH9WZAMUw-1; Fri, 14 Feb 2020 12:05:55 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 113B31005513; Fri, 14 Feb 2020 17:05:54 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id D44BD89F3C; Fri, 14 Feb 2020 17:05:50 +0000 (UTC) From: Kevin Traynor To: Vitaliy Mysak Cc: Tiwei Bie , dpdk stable Date: Fri, 14 Feb 2020 17:03:26 +0000 Message-Id: <20200214170337.25093-32-ktraynor@redhat.com> In-Reply-To: <20200214170337.25093-1-ktraynor@redhat.com> References: <20200214170337.25093-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: iWPWhacRM7SxRYH9WZAMUw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'vhost: do not treat empty socket message as error' has been queued to LTS release 18.11.7 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/20/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/51c2aa612ee8b59ca0= d4cd92303f1d58e470cc5c Thanks. Kevin. --- >From 51c2aa612ee8b59ca0d4cd92303f1d58e470cc5c Mon Sep 17 00:00:00 2001 From: Vitaliy Mysak Date: Thu, 30 Jan 2020 09:05:39 +0100 Subject: [PATCH] vhost: do not treat empty socket message as error [ upstream commit bedf87c521902d1caeb0974fe9d3344584b849b5 ] 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") Signed-off-by: Vitaliy Mysak Reviewed-by: Tiwei Bie --- lib/librte_vhost/socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index 6a57b27ec0..75f6703f56 100644 --- a/lib/librte_vhost/socket.c +++ b/lib/librte_vhost/socket.c @@ -126,5 +126,6 @@ read_fd_message(int sockfd, char *buf, int buflen, int = *fds, int max_fds, =09ret =3D recvmsg(sockfd, &msgh, 0); =09if (ret <=3D 0) { -=09=09RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n"); +=09=09if (ret) +=09=09=09RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n"); =09=09return ret; =09} --=20 2.21.1 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092020-02-14 17:02:38.848267063 +0000 +++ 0032-vhost-do-not-treat-empty-socket-message-as-error.patch=092020-02-1= 4 17:02:37.042406039 +0000 @@ -1 +1 @@ -From bedf87c521902d1caeb0974fe9d3344584b849b5 Mon Sep 17 00:00:00 2001 +From 51c2aa612ee8b59ca0d4cd92303f1d58e470cc5c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bedf87c521902d1caeb0974fe9d3344584b849b5 ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 85c64485c2..7c80121790 100644 +index 6a57b27ec0..75f6703f56 100644 @@ -29 +30 @@ -@@ -128,5 +128,6 @@ read_fd_message(int sockfd, char *buf, int buflen, int= *fds, int max_fds, +@@ -126,5 +126,6 @@ read_fd_message(int sockfd, char *buf, int buflen, int= *fds, int max_fds, @@ -32 +33 @@ --=09=09VHOST_LOG_CONFIG(ERR, "recvmsg failed\n"); +-=09=09RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n"); @@ -34 +35 @@ -+=09=09=09VHOST_LOG_CONFIG(ERR, "recvmsg failed\n"); ++=09=09=09RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n");