[dpdk-stable] patch 'vhost: do not treat empty socket message as error' has been queued to stable release 19.11.1
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Feb 11 12:22:03 CET 2020
Hi,
FYI, your patch has been queued to stable release 19.11.1
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/13/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 rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Thanks.
Luca Boccassi
---
>From d4cd6ac99c71a8acc6f0fd0aa43fcd16fc325cb1 Mon Sep 17 00:00:00 2001
From: Vitaliy Mysak <vitaliy.mysak at intel.com>
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 <vitaliy.mysak at intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>
---
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 26b9bb5534..c9322707e7 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -127,7 +127,8 @@ read_fd_message(int sockfd, char *buf, int buflen, int *fds, int max_fds,
ret = recvmsg(sockfd, &msgh, 0);
if (ret <= 0) {
- RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n");
+ if (ret)
+ RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n");
return ret;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-02-11 11:17:44.715493262 +0000
+++ 0177-vhost-do-not-treat-empty-socket-message-as-error.patch 2020-02-11 11:17:38.824009275 +0000
@@ -1,8 +1,10 @@
-From bedf87c521902d1caeb0974fe9d3344584b849b5 Mon Sep 17 00:00:00 2001
+From d4cd6ac99c71a8acc6f0fd0aa43fcd16fc325cb1 Mon Sep 17 00:00:00 2001
From: Vitaliy Mysak <vitaliy.mysak at intel.com>
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
@@ -14,7 +16,6 @@
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>
Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>
@@ -23,16 +24,16 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
-index 85c64485c2..7c80121790 100644
+index 26b9bb5534..c9322707e7 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -127,7 +127,8 @@ read_fd_message(int sockfd, char *buf, int buflen, int *fds, int max_fds,
ret = recvmsg(sockfd, &msgh, 0);
if (ret <= 0) {
-- VHOST_LOG_CONFIG(ERR, "recvmsg failed\n");
+- RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n");
+ if (ret)
-+ VHOST_LOG_CONFIG(ERR, "recvmsg failed\n");
++ RTE_LOG(ERR, VHOST_CONFIG, "recvmsg failed\n");
return ret;
}
More information about the stable
mailing list