[PATCH v7 4/5] drivers: mlx5 use rte thread set name

Tyler Retzlaff roretzla at linux.microsoft.com
Mon Jan 23 20:39:33 CET 2023


Use the new internal rte_thread_set_name API instead of the now
deprecated rte_thread_setname API.

Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>

Acked-by: Morten Brørup <mb at smartsharesystems.com>

---
 drivers/net/mlx5/mlx5_hws_cnt.c     | 3 ++-
 drivers/vdpa/mlx5/mlx5_vdpa_event.c | 3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_hws_cnt.c b/drivers/net/mlx5/mlx5_hws_cnt.c
index 51704ef..05cc954 100644
--- a/drivers/net/mlx5/mlx5_hws_cnt.c
+++ b/drivers/net/mlx5/mlx5_hws_cnt.c
@@ -465,7 +465,8 @@ struct mlx5_hws_cnt_pool *
 	}
 	snprintf(name, CNT_THREAD_NAME_MAX - 1, "%s/svc@%d",
 		 sh->ibdev_name, service_core);
-	rte_thread_setname(sh->cnt_svc->service_thread, name);
+	rte_thread_set_name((rte_thread_t){(uintptr_t)sh->cnt_svc->service_thread},
+		name);
 	CPU_SET(service_core, &cpuset);
 	pthread_setaffinity_np(sh->cnt_svc->service_thread, sizeof(cpuset),
 				&cpuset);
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
index 4d81976..f3d392c 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
@@ -547,8 +547,7 @@
 		goto out;
 	}
 	snprintf(name, sizeof(name), "vDPA-mlx5-%d", priv->vid);
-	if (rte_thread_setname(priv->timer_tid, name) != 0)
-		DRV_LOG(DEBUG, "Cannot set timer thread name.");
+	rte_thread_set_name((rte_thread_t){(uintptr_t)priv->timer_tid}, name);
 out:
 	if (attrp != NULL)
 		pthread_attr_destroy(attrp);
-- 
1.8.3.1



More information about the dev mailing list