diff mbox series

[v2,1/3] eal/thread: ignore rte_thread_setname() failure in ctrl thread

Message ID 20180710104447.16756-1-darek.stojaczyk@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [v2,1/3] eal/thread: ignore rte_thread_setname() failure in ctrl thread | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Dariusz Stojaczyk July 10, 2018, 10:44 a.m. UTC
From: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>

The error is not fatal and we can physically continue
creating the thread. It simply won't have a name.

If rte_thread_setname() fails, we will just print
a debug log now. EAL does the same for lcore threads.

Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_eal/common/eal_common_thread.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Thomas Monjalon July 12, 2018, 10:19 p.m. UTC | #1
10/07/2018 12:44, Dariusz Stojaczyk:
> From: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
> 
> The error is not fatal and we can physically continue
> creating the thread. It simply won't have a name.
> 
> If rte_thread_setname() fails, we will just print
> a debug log now. EAL does the same for lcore threads.
> 
> Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> Reviewed-by: Olivier Matz <olivier.matz@6wind.com>

Series applied, thanks
diff mbox series

Patch

diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c
index 42398630a..8110ac2ae 100644
--- a/lib/librte_eal/common/eal_common_thread.c
+++ b/lib/librte_eal/common/eal_common_thread.c
@@ -191,7 +191,8 @@  rte_ctrl_thread_create(pthread_t *thread, const char *name,
 	if (name != NULL) {
 		ret = rte_thread_setname(*thread, name);
 		if (ret < 0)
-			goto fail;
+			RTE_LOG(DEBUG, EAL,
+				"Cannot set name for ctrl thread\n");
 	}
 
 	cpu_found = 0;