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 40D5142411; Wed, 18 Jan 2023 20:54:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8751F42D16; Wed, 18 Jan 2023 20:54:13 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2075B4067E for ; Wed, 18 Jan 2023 20:54:11 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 6BF4F20E0A09; Wed, 18 Jan 2023 11:54:10 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6BF4F20E0A09 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1674071650; bh=JK33kn+Fp53Awd2PliiIZhJ6/BtWFXhNabnUiUyrK3w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l24hEeVTi0qYIQQQvJhxokQkgbaSO4ErTRuCJQQTTi8ZRgp5YxEWvq1TGOtwrkY3y K7BiSmq+mlTuhgBOxV1xiL0uOJ6GNMeKlFstUOP2zigWePLrOT13qrK4ihmVvRSt7e 5lVRvyyX4GIgYMc6VoyY5oPvqet5mk6Sl9HthbMs= 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 v6 3/5] eal: set thread name on Windows worker threads Date: Wed, 18 Jan 2023 11:54:04 -0800 Message-Id: <1674071646-6854-4-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1674071646-6854-1-git-send-email-roretzla@linux.microsoft.com> References: <1670439617-9054-1-git-send-email-roretzla@linux.microsoft.com> <1674071646-6854-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 Bring Windows EAL worker thread initialization in line with linux & freebsd by setting the worker thread name using the new platform agnostic rte_thread_set_name API. Signed-off-by: Tyler Retzlaff --- lib/eal/windows/eal.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c index b9f95ed..e561f87 100644 --- a/lib/eal/windows/eal.c +++ b/lib/eal/windows/eal.c @@ -282,6 +282,7 @@ enum rte_proc_type_t enum rte_iova_mode iova_mode; int ret; char cpuset[RTE_CPU_AFFINITY_STR_LEN]; + char thread_name[RTE_MAX_THREAD_NAME_LEN]; eal_log_init(NULL, 0); @@ -437,6 +438,12 @@ enum rte_proc_type_t if (rte_thread_create(&lcore_config[i].thread_id, NULL, eal_thread_loop, (void *)(uintptr_t)i) != 0) rte_panic("Cannot create thread\n"); + + /* Set thread_name for aid in debugging. */ + snprintf(thread_name, sizeof(thread_name), + "rte-worker-%d", i); + rte_thread_set_name(lcore_config[i].thread_id, thread_name); + ret = rte_thread_set_affinity_by_id(lcore_config[i].thread_id, &lcore_config[i].cpuset); if (ret != 0) -- 1.8.3.1