From patchwork Mon Jan 23 19:39:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 122449 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 1D22E4246C; Mon, 23 Jan 2023 20:39:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B183740223; Mon, 23 Jan 2023 20:39:37 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B714D400EF for ; Mon, 23 Jan 2023 20:39:36 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 1016020E2C01; Mon, 23 Jan 2023 11:39:36 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1016020E2C01 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1674502776; bh=WLcWVT71CuxonL9JjVw1UH3jlCJVaO+ICkY8KwMl2bE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HUqVkk6gEykTQmoIs6MFwz6YFb/MaoplOis6jMinrpLV9RzIVzWDzpLhOvRDp+FGz EPmWEG+c4UN/Ej3uAjmeXK6n/aXy4JdIo5BoImhkuvvyqi3qdvF6Ppe2kA10yTUvSH syccbY5UwXOm5eQ3VS4mj/yez9P4JxghqGaVljZA= From: Tyler Retzlaff To: dev@dpdk.org Cc: thomas@monjalon.net, david.marchand@redhat.com, jerinjacobk@gmail.com, mb@smartsharesystems.com, Tyler Retzlaff Subject: [PATCH v7 0/5] add rte_thread_set_name API for rte_thread_t Date: Mon, 23 Jan 2023 11:39:29 -0800 Message-Id: <1674502774-20253-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1670439617-9054-1-git-send-email-roretzla@linux.microsoft.com> References: <1670439617-9054-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 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 Replace the rte_thread_setname API which operates on pthread_t with rte_thread_set_name that operates on rte_thread_t. We should try to align tracing output from the EAL for all platforms but in this case we are retaining an exception for linux as requested from the community. v7: * don't dereference thread_name after successful completion of mbsrtowcs. (fixes NULL dereference on Windows). v6: * clean up commit descriptions * add patch to set worker thread name on windows * remove __rte_deprecated from rte_thread_setname v5: * rename rte_thread_getname -> thread_get_name v4: * retain and move rte_thread_getname function to the single site of use v3: * fix coding style error * move remove of rte_thread_getname to patch #2 v2: * initial series provided get/set for lcore thread id, those additions have been removed as per discussion. including unit test * add a single api rte_thread_set_name does not fail but emits debug logging if the internal implementation is aware of in-exact use of the name or failure to set the name * adapt mlx5 driver to avoid use of deprecated API Series-acked-by: Morten Brørup Tyler Retzlaff (5): eal: add thread set name API operating on rte thread eal: remove thread getname API eal: set thread name on Windows worker threads drivers: mlx5 use rte thread set name eal: deprecation notice for rte thread setname API doc/guides/rel_notes/deprecation.rst | 4 ++++ drivers/net/mlx5/mlx5_hws_cnt.c | 3 ++- drivers/vdpa/mlx5/mlx5_vdpa_event.c | 3 +-- lib/eal/common/eal_common_thread.c | 8 ++----- lib/eal/common/eal_common_trace.c | 15 ++++++++++++- lib/eal/freebsd/eal.c | 3 +-- lib/eal/freebsd/eal_thread.c | 20 +++++++++-------- lib/eal/include/rte_lcore.h | 17 -------------- lib/eal/include/rte_thread.h | 17 ++++++++++++++ lib/eal/linux/eal.c | 6 +---- lib/eal/linux/eal_thread.c | 29 +++++++++++++++--------- lib/eal/version.map | 4 +++- lib/eal/windows/eal.c | 7 ++++++ lib/eal/windows/rte_thread.c | 43 ++++++++++++++++++++++++++++++++++++ 14 files changed, 124 insertions(+), 55 deletions(-)