[dpdk-dev] [PATCH 2/7] net/ice: support set VSI reset thread name

Min Hu (Connor) humin29 at huawei.com
Sat Apr 10 12:40:16 CEST 2021


From: Chengwen Feng <fengchengwen at huawei.com>

This patch supports set VSI reset 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>
---
 drivers/net/ice/ice_dcf_parent.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
index a8571b3..86aa32b 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;
 
@@ -171,6 +173,9 @@ start_vsi_reset_thread(struct ice_dcf_hw *dcf_hw, bool vfr, uint16_t vf_id)
 		PMD_DRV_LOG(ERR, "Failed to start the thread for reset handling");
 		free(param);
 	}
+
+	snprintf(name, sizeof(name), "ice-reset-%u", vf_id);
+	rte_thread_setname(thread, name);
 }
 
 void
-- 
2.7.4



More information about the dev mailing list