From patchwork Sat Apr 17 09:09:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "humin (Q)" X-Patchwork-Id: 91702 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3A078A0562; Sat, 17 Apr 2021 11:10:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D0D01161E73; Sat, 17 Apr 2021 11:09:52 +0200 (CEST) Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by mails.dpdk.org (Postfix) with ESMTP id 6D7E240698 for ; Sat, 17 Apr 2021 11:09:44 +0200 (CEST) Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FMnKd19r8zlYhW; Sat, 17 Apr 2021 17:07:49 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Sat, 17 Apr 2021 17:09:37 +0800 From: "Min Hu (Connor)" To: CC: , , , , , , , , Date: Sat, 17 Apr 2021 17:09:42 +0800 Message-ID: <1618650588-34268-2-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618650588-34268-1-git-send-email-humin29@huawei.com> References: <1618051221-19962-1-git-send-email-humin29@huawei.com> <1618650588-34268-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2 1/7] net/ark: support set thread name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Chengwen Feng This patch supports set delay packet generator start thread name which is helpful for debugging. Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) --- drivers/net/ark/ark_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index 9dea5fa..6372cf7 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -568,8 +568,8 @@ eth_ark_dev_start(struct rte_eth_dev *dev) /* Delay packet generatpr start allow the hardware to be ready * This is only used for sanity checking with internal generator */ - if (pthread_create(&thread, NULL, - ark_pktgen_delay_start, ark->pg)) { + if (rte_ctrl_thread_create(&thread, "ark-delay-pg", NULL, + ark_pktgen_delay_start, ark) != 0) { ARK_PMD_LOG(ERR, "Could not create pktgen " "starter thread\n"); return -1; From patchwork Sat Apr 17 09:09:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "humin (Q)" X-Patchwork-Id: 91704 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2FE7FA0562; Sat, 17 Apr 2021 11:10:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0EDE161EB5; Sat, 17 Apr 2021 11:09:55 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 7AEB84069C for ; Sat, 17 Apr 2021 11:09:44 +0200 (CEST) Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FMnJQ44VPzpY2K; Sat, 17 Apr 2021 17:06:46 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Sat, 17 Apr 2021 17:09:38 +0800 From: "Min Hu (Connor)" To: CC: , , , , , , , , Date: Sat, 17 Apr 2021 17:09:43 +0800 Message-ID: <1618650588-34268-3-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618650588-34268-1-git-send-email-humin29@huawei.com> References: <1618051221-19962-1-git-send-email-humin29@huawei.com> <1618650588-34268-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2 2/7] net/ice: support set VSI reset thread name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Chengwen Feng This patch supports set VSI reset thread name which is helpful for debugging. Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) --- drivers/net/ice/ice_dcf_parent.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c index a8571b3..c8e4332 100644 --- a/drivers/net/ice/ice_dcf_parent.c +++ b/drivers/net/ice/ice_dcf_parent.c @@ -151,7 +151,9 @@ ice_dcf_vsi_update_service_handler(void *param) static void start_vsi_reset_thread(struct ice_dcf_hw *dcf_hw, bool vfr, uint16_t vf_id) { +#define THREAD_NAME_LEN 16 struct ice_dcf_reset_event_param *param; + char name[THREAD_NAME_LEN]; pthread_t thread; int ret; @@ -165,9 +167,10 @@ start_vsi_reset_thread(struct ice_dcf_hw *dcf_hw, bool vfr, uint16_t vf_id) param->vfr = vfr; param->vf_id = vf_id; - ret = pthread_create(&thread, NULL, - ice_dcf_vsi_update_service_handler, param); - if (ret) { + snprintf(name, sizeof(name), "ice-reset-%u", vf_id); + ret = rte_ctrl_thread_create(&thread, name, NULL, + ice_dcf_vsi_update_service_handler, param); + if (ret != 0) { PMD_DRV_LOG(ERR, "Failed to start the thread for reset handling"); free(param); } From patchwork Sat Apr 17 09:09:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "humin (Q)" X-Patchwork-Id: 91697 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 274A8A0562; Sat, 17 Apr 2021 11:09:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1B6340143; Sat, 17 Apr 2021 11:09:45 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 46B944003D for ; Sat, 17 Apr 2021 11:09:44 +0200 (CEST) Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FMnJQ4L7pzpYBj; Sat, 17 Apr 2021 17:06:46 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Sat, 17 Apr 2021 17:09:38 +0800 From: "Min Hu (Connor)" To: CC: , , , , , , , , Date: Sat, 17 Apr 2021 17:09:44 +0800 Message-ID: <1618650588-34268-4-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618650588-34268-1-git-send-email-humin29@huawei.com> References: <1618051221-19962-1-git-send-email-humin29@huawei.com> <1618650588-34268-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2 3/7] vdpa/ifc: support set notify and vring relay thread name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Chengwen Feng This patch supports set notify and vring relay thread name which is helpful for debugging. Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) --- drivers/vdpa/ifc/ifcvf_vdpa.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c index 7a06f97..1dc813d 100644 --- a/drivers/vdpa/ifc/ifcvf_vdpa.c +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c @@ -37,6 +37,8 @@ RTE_LOG_REGISTER(ifcvf_vdpa_logtype, pmd.vdpa.ifcvf, NOTICE); #define IFCVF_VDPA_MODE "vdpa" #define IFCVF_SW_FALLBACK_LM "sw-live-migration" +#define THREAD_NAME_LEN 16 + static const char * const ifcvf_valid_arguments[] = { IFCVF_VDPA_MODE, IFCVF_SW_FALLBACK_LM, @@ -494,14 +496,17 @@ notify_relay(void *arg) static int setup_notify_relay(struct ifcvf_internal *internal) { + char name[THREAD_NAME_LEN]; int ret; - ret = pthread_create(&internal->tid, NULL, notify_relay, - (void *)internal); - if (ret) { + snprintf(name, sizeof(name), "ifc-notify-%d", internal->vid); + ret = rte_ctrl_thread_create(&internal->tid, name, NULL, notify_relay, + (void *)internal); + if (ret != 0) { DRV_LOG(ERR, "failed to create notify relay pthread."); return -1; } + return 0; } @@ -797,14 +802,17 @@ vring_relay(void *arg) static int setup_vring_relay(struct ifcvf_internal *internal) { + char name[THREAD_NAME_LEN]; int ret; - ret = pthread_create(&internal->tid, NULL, vring_relay, - (void *)internal); - if (ret) { + snprintf(name, sizeof(name), "ifc-vring-%d", internal->vid); + ret = rte_ctrl_thread_create(&internal->tid, name, NULL, vring_relay, + (void *)internal); + if (ret != 0) { DRV_LOG(ERR, "failed to create ring relay pthread."); return -1; } + return 0; } From patchwork Sat Apr 17 09:09:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "humin (Q)" X-Patchwork-Id: 91701 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8C052A0562; Sat, 17 Apr 2021 11:10:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 85DF9161E2A; Sat, 17 Apr 2021 11:09:51 +0200 (CEST) Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by mails.dpdk.org (Postfix) with ESMTP id 6B0744068F for ; Sat, 17 Apr 2021 11:09:44 +0200 (CEST) Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FMnKd0hyhzlY8W; Sat, 17 Apr 2021 17:07:49 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Sat, 17 Apr 2021 17:09:38 +0800 From: "Min Hu (Connor)" To: CC: , , , , , , , , Date: Sat, 17 Apr 2021 17:09:45 +0800 Message-ID: <1618650588-34268-5-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618650588-34268-1-git-send-email-humin29@huawei.com> References: <1618051221-19962-1-git-send-email-humin29@huawei.com> <1618650588-34268-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2 4/7] raw/ifpga: support set monitor thread name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Chengwen Feng This patch supports set monitor thread name which is helpful for debugging. Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) --- drivers/raw/ifpga/ifpga_rawdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c index d9a46ef..f2551be 100644 --- a/drivers/raw/ifpga/ifpga_rawdev.c +++ b/drivers/raw/ifpga/ifpga_rawdev.c @@ -526,10 +526,10 @@ ifpga_monitor_start_func(void) int ret; if (ifpga_monitor_start == 0) { - ret = pthread_create(&ifpga_monitor_start_thread, - NULL, - ifpga_rawdev_gsd_handle, NULL); - if (ret) { + ret = rte_ctrl_thread_create(&ifpga_monitor_start_thread, + "ifpga-monitor", NULL, + ifpga_rawdev_gsd_handle, NULL); + if (ret != 0) { IFPGA_RAWDEV_PMD_ERR( "Fail to create ifpga nonitor thread"); return -1; From patchwork Sat Apr 17 09:09:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "humin (Q)" X-Patchwork-Id: 91698 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BC86FA0562; Sat, 17 Apr 2021 11:09:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28F5E406A3; Sat, 17 Apr 2021 11:09:47 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 4AF9D40143 for ; Sat, 17 Apr 2021 11:09:44 +0200 (CEST) Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FMnJQ4ZrlzpYCm; Sat, 17 Apr 2021 17:06:46 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Sat, 17 Apr 2021 17:09:39 +0800 From: "Min Hu (Connor)" To: CC: , , , , , , , , Date: Sat, 17 Apr 2021 17:09:46 +0800 Message-ID: <1618650588-34268-6-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618650588-34268-1-git-send-email-humin29@huawei.com> References: <1618051221-19962-1-git-send-email-humin29@huawei.com> <1618650588-34268-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2 5/7] examples/performance-thread: support set thread name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Chengwen Feng This patch supports set helloworld thread name which is helpful for debugging. Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) --- examples/performance-thread/pthread_shim/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/performance-thread/pthread_shim/main.c b/examples/performance-thread/pthread_shim/main.c index 23e3b5e..4ce3622 100644 --- a/examples/performance-thread/pthread_shim/main.c +++ b/examples/performance-thread/pthread_shim/main.c @@ -27,6 +27,7 @@ #define DEBUG_APP 0 #define HELLOW_WORLD_MAX_LTHREADS 10 +#define THREAD_NAME_LEN 16 #ifndef __GLIBC__ /* sched_getcpu() is glibc-specific */ #define sched_getcpu() rte_lcore_id() @@ -149,6 +150,7 @@ static void *initial_lthread(void *args __rte_unused) */ pthread_attr_t attr; rte_cpuset_t cpuset; + char name[THREAD_NAME_LEN]; CPU_ZERO(&cpuset); CPU_SET(lcore, &cpuset); @@ -160,6 +162,9 @@ static void *initial_lthread(void *args __rte_unused) helloworld_pthread, (void *) i); if (ret != 0) rte_exit(EXIT_FAILURE, "Cannot create helloworld thread\n"); + + snprintf(name, sizeof(name), "helloworld-%u", (uint32_t)i); + rte_thread_setname(tid[i], name); } /* wait for 1s to allow threads From patchwork Sat Apr 17 09:09:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "humin (Q)" X-Patchwork-Id: 91703 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AFF6FA0562; Sat, 17 Apr 2021 11:10:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 81755161E93; Sat, 17 Apr 2021 11:09:54 +0200 (CEST) Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by mails.dpdk.org (Postfix) with ESMTP id 7D3EA4069F for ; Sat, 17 Apr 2021 11:09:44 +0200 (CEST) Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FMnKd0y17zlYKc; Sat, 17 Apr 2021 17:07:49 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Sat, 17 Apr 2021 17:09:39 +0800 From: "Min Hu (Connor)" To: CC: , , , , , , , , Date: Sat, 17 Apr 2021 17:09:47 +0800 Message-ID: <1618650588-34268-7-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618650588-34268-1-git-send-email-humin29@huawei.com> References: <1618051221-19962-1-git-send-email-humin29@huawei.com> <1618650588-34268-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2 6/7] telemetry: support set init threads name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Chengwen Feng This patch supports set init threads name which is helpful for debugging. Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) Acked-by: Bruce Richardson --- lib/librte_telemetry/telemetry.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c index 7e08afd..8f48337 100644 --- a/lib/librte_telemetry/telemetry.c +++ b/lib/librte_telemetry/telemetry.c @@ -442,7 +442,7 @@ telemetry_legacy_init(void) return -1; pthread_create(&t_old, NULL, socket_listener, &v1_socket); pthread_setaffinity_np(t_old, sizeof(*thread_cpuset), thread_cpuset); - + pthread_setname_np(t_old, "telemetry-v1"); TMTY_LOG(DEBUG, "Legacy telemetry socket initialized ok\n"); return 0; } @@ -471,6 +471,7 @@ telemetry_v2_init(void) return -1; pthread_create(&t_new, NULL, socket_listener, &v2_socket); pthread_setaffinity_np(t_new, sizeof(*thread_cpuset), thread_cpuset); + pthread_setname_np(t_new, "telemetry-v2"); atexit(unlink_sockets); return 0; From patchwork Sat Apr 17 09:09:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "humin (Q)" X-Patchwork-Id: 91700 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 63A1DA0562; Sat, 17 Apr 2021 11:10:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2578F161DF1; Sat, 17 Apr 2021 11:09:50 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 537884068E for ; Sat, 17 Apr 2021 11:09:44 +0200 (CEST) Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FMnJQ3msgzpXRZ; Sat, 17 Apr 2021 17:06:46 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.498.0; Sat, 17 Apr 2021 17:09:39 +0800 From: "Min Hu (Connor)" To: CC: , , , , , , , , Date: Sat, 17 Apr 2021 17:09:48 +0800 Message-ID: <1618650588-34268-8-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618650588-34268-1-git-send-email-humin29@huawei.com> References: <1618051221-19962-1-git-send-email-humin29@huawei.com> <1618650588-34268-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v2 7/7] examples/vhost_blk: support set ctrl worker thread name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Chengwen Feng This patch supports set ctrl worker thread name which is helpful for debugging. Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) --- 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; }