From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id E688F4238D;
	Fri, 13 Jan 2023 19:52:11 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 1D28D42DCC;
	Fri, 13 Jan 2023 19:52:08 +0100 (CET)
Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182])
 by mails.dpdk.org (Postfix) with ESMTP id 99BE842D87
 for <dev@dpdk.org>; Fri, 13 Jan 2023 19:52:05 +0100 (CET)
Received: by linux.microsoft.com (Postfix, from userid 1086)
 id E422120DFDBA; Fri, 13 Jan 2023 10:52:04 -0800 (PST)
DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E422120DFDBA
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;
 s=default; t=1673635924;
 bh=dF/mOuxm6tz0LpnCL6O5V08ZPz70QGofpoe35szXW9k=;
 h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
 b=Fp6qQQlz0wJ7/AwfATIeJS5r2o6qVHQ5gA1AVWIXTSV1WqBiaAH6RgpoW+zCVRFKK
 2MqTt8ndkJinUnPnxtG0efysGkzEj0mvv70k31Abao0ZwLFkTQmh54pH8Px3KvTyau
 hs6L85v/GgC8AblAgHlQoWfXDOgPYAspg51OtSLc=
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, david.marchand@redhat.com, mb@smartsharesystems.com,
 jerinjacobk@gmail.com, Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH v4 3/4] drivers: mlx5 use rte thread set name
Date: Fri, 13 Jan 2023 10:52:02 -0800
Message-Id: <1673635923-12432-4-git-send-email-roretzla@linux.microsoft.com>
X-Mailer: git-send-email 1.8.3.1
In-Reply-To: <1673635923-12432-1-git-send-email-roretzla@linux.microsoft.com>
References: <1670439617-9054-1-git-send-email-roretzla@linux.microsoft.com>
 <1673635923-12432-1-git-send-email-roretzla@linux.microsoft.com>
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

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

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.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