From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1A851A0543; Wed, 14 Dec 2022 17:47:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EED2842D20; Wed, 14 Dec 2022 17:47:29 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8DE74400D6 for ; Wed, 14 Dec 2022 17:47:24 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id A8F1E20B87D4; Wed, 14 Dec 2022 08:47:23 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A8F1E20B87D4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1671036443; bh=s18BLR0v8RehfKZfRMIyCV8lMFpSBZFwRiXarQ4Ym0g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Od0pGnetnfaSAzKGwLa6mj2GDBmSs2RTvbJEy/LSlKaC/o3XXIk3iVYmfsM40rklk ekXrx44lZzWtrF1NzH8JDXGjnq0/8XoSqLCXUhcYXgfE7elth4zzVHkdcwnrZqhVNP 8KDrPaSC56Z6QJblKbRyj3mrgppeM+0hN8gjas+0= From: Tyler Retzlaff To: dev@dpdk.org Cc: thomas@monjalon.net, david.marchand@redhat.com, olivier.matz@6wind.com, stephen@networkplumber.org, mb@smartsharesystems.com, Tyler Retzlaff Subject: [PATCH v2 4/4] drivers: mlx5 use rte thread set name Date: Wed, 14 Dec 2022 08:47:21 -0800 Message-Id: <1671036441-10234-5-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1671036441-10234-1-git-send-email-roretzla@linux.microsoft.com> References: <1670439617-9054-1-git-send-email-roretzla@linux.microsoft.com> <1671036441-10234-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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 --- drivers/net/mlx5/mlx5_hws_cnt.c | 4 +++- drivers/vdpa/mlx5/mlx5_vdpa_event.c | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_hws_cnt.c b/drivers/net/mlx5/mlx5_hws_cnt.c index 51704ef..8103ab9 100644 --- a/drivers/net/mlx5/mlx5_hws_cnt.c +++ b/drivers/net/mlx5/mlx5_hws_cnt.c @@ -465,7 +465,9 @@ 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