eal: set name when creating a control thread
[dpdk.git] / lib / librte_pdump / rte_pdump.c
index 70de0c4..0612632 100644 (file)
@@ -577,7 +577,8 @@ rte_pdump_init(const char *path)
        }
 
        /* create the host thread to wait/handle pdump requests */
-       ret = rte_ctrl_thread_create(&pdump_thread, NULL,
+       snprintf(thread_name, sizeof(thread_name), "pdump-thread");
+       ret = rte_ctrl_thread_create(&pdump_thread, thread_name, NULL,
                                pdump_thread_main, NULL);
        if (ret != 0) {
                RTE_LOG(ERR, PDUMP,
@@ -585,13 +586,6 @@ rte_pdump_init(const char *path)
                        strerror(-ret), __func__, __LINE__);
                return -1;
        }
-       /* Set thread_name for aid in debugging. */
-       snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN, "pdump-thread");
-       ret = rte_thread_setname(pdump_thread, thread_name);
-       if (ret != 0) {
-               RTE_LOG(DEBUG, PDUMP,
-                       "Failed to set thread name for pdump handling\n");
-       }
 
        return 0;
 }