[dpdk-stable] patch 'vhost: fix error code check when creating thread' has been queued to LTS release 16.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Jan 26 14:13:19 CET 2018
Hi,
FYI, your patch has been queued to LTS release 16.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.
Thanks.
Luca Boccassi
---
>From 8ae9838b58bc57d386479582af666545cb4c3f23 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz at 6wind.com>
Date: Fri, 8 Dec 2017 11:19:49 +0100
Subject: [PATCH] vhost: fix error code check when creating thread
[ upstream commit da51d2f6b8b652da8eb9d4b50df4f3f5a24b656f ]
On error, pthread_create() returns a positive number (errno).
Fix the test on the return value.
Fixes: af1475918124 ("vhost: introduce API to start a specific driver")
Fixes: e623e0c6d8a5 ("vhost: add reconnect ability")
Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Reviewed-by: Jens Freimann <jfreimann at redhat.com>
---
lib/librte_vhost/socket.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 84e059513..a95fbfbb9 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -438,7 +438,7 @@ vhost_user_reconnect_init(void)
ret = pthread_create(&reconn_tid, NULL,
vhost_user_client_reconnect, NULL);
- if (ret < 0)
+ if (ret != 0)
RTE_LOG(ERR, VHOST_CONFIG, "failed to create reconnect thread");
return ret;
@@ -525,7 +525,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
if ((flags & RTE_VHOST_USER_CLIENT) != 0) {
vsocket->reconnect = !(flags & RTE_VHOST_USER_NO_RECONNECT);
if (vsocket->reconnect && reconn_tid == 0) {
- if (vhost_user_reconnect_init() < 0) {
+ if (vhost_user_reconnect_init() != 0) {
free(vsocket->path);
free(vsocket);
goto out;
--
2.14.2
More information about the stable
mailing list