[dpdk-dev] [PATCH v2 7/7] examples/vhost_blk: support set ctrl worker thread name

Min Hu (Connor) humin29 at huawei.com
Sat Apr 17 11:09:48 CEST 2021


From: Chengwen Feng <fengchengwen at huawei.com>

This patch supports set ctrl worker thread name which is helpful for
debugging.

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
---
 examples/vhost_blk/vhost_blk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
index 5c64071..54f81b3 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -685,7 +685,8 @@ new_device(int vid)
 	/* start polling vring */
 	worker_thread_status = WORKER_STATE_START;
 	fprintf(stdout, "New Device %s, Device ID %d\n", path, vid);
-	if (pthread_create(&tid, NULL, &ctrlr_worker, ctrlr) < 0) {
+	if (rte_ctrl_thread_create(&tid, "vhostblk-ctrlr", NULL,
+				   &ctrlr_worker, ctrlr) != 0) {
 		fprintf(stderr, "Worker Thread Started Failed\n");
 		return -1;
 	}
-- 
2.7.4



More information about the dev mailing list