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 8DBC8A00C2; Mon, 26 Sep 2022 12:03:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8596B4069B; Mon, 26 Sep 2022 12:03:28 +0200 (CEST) Received: from guvercin.ceng.metu.edu.tr (guvercin.ceng.metu.edu.tr [144.122.171.43]) by mails.dpdk.org (Postfix) with ESMTP id 19402400D7 for ; Mon, 26 Sep 2022 12:03:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by guvercin.ceng.metu.edu.tr (Postfix) with ESMTP id C36202C0C2; Mon, 26 Sep 2022 13:03:26 +0300 (+03) X-Virus-Scanned: Debian amavisd-new at ceng.metu.edu.tr Received: from guvercin.ceng.metu.edu.tr ([127.0.0.1]) by localhost (guvercin.ceng.metu.edu.tr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2439XaFWfk6y; Mon, 26 Sep 2022 13:03:16 +0300 (+03) Received: from dmu.otak.ist (unknown [212.156.37.190]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: e1885458) by guvercin.ceng.metu.edu.tr (Postfix) with ESMTPSA id F31ED2C24B; Mon, 26 Sep 2022 13:03:15 +0300 (+03) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ceng.metu.edu.tr; s=mail; t=1664186596; bh=blLCex2kimuyiD6TbDNWd7pebNmPFvQQlkIbR2a9Lmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KgdXUU6vjcNJN4Pn2/dZUfx79MRqLfqgfBKRzwHLtb0AYIMmtW1Lfc0khyHimItJu xzRfpKxquT8XPX/GwLFzGjfo9rSY01a9TWN66nDoFczmbsAREa5DEw+JXzW19bS3Jg yiASiJAbx/1+5cqYSAQ9YYju0h2PFHEUmb2+TYcQ= From: =?UTF-8?q?Abdullah=20=C3=96mer=20Yama=C3=A7?= To: dev@dpdk.org Cc: =?UTF-8?q?Abdullah=20=C3=96mer=20Yama=C3=A7?= , Stephen Hemminger , David Marchand Subject: [PATCH v5] eal: fix thread names for high order lcores Date: Mon, 26 Sep 2022 13:03:14 +0300 Message-Id: <20220926100314.1115507-1-omer.yamac@ceng.metu.edu.tr> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 In this patch we suggest a new name for lcore-worker. In case of higher order (greater than 99) logical cores, name is truncated (length is restricted to 16 characters, including the terminating null byte ('\0')) and it makes hard to follow threads. Ex: This issue can be generated using following arguments: --lcores=0,10@1,100@2 Then we have; lcore-worker-10 lcore-worker-10 Signed-off-by: Abdullah Ömer Yamaç Acked-by: Stephen Hemminger --- Cc: David Marchand --- lib/eal/freebsd/eal.c | 2 +- lib/eal/linux/eal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c index ee5c929da8..a1bb5363b1 100644 --- a/lib/eal/freebsd/eal.c +++ b/lib/eal/freebsd/eal.c @@ -817,7 +817,7 @@ rte_eal_init(int argc, char **argv) /* Set thread_name for aid in debugging. */ snprintf(thread_name, sizeof(thread_name), - "lcore-worker-%d", i); + "rte-worker-%d", i); rte_thread_setname(lcore_config[i].thread_id, thread_name); ret = pthread_setaffinity_np(lcore_config[i].thread_id, diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index 46bf52cef0..9a168b7773 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -1248,7 +1248,7 @@ rte_eal_init(int argc, char **argv) /* Set thread_name for aid in debugging. */ snprintf(thread_name, sizeof(thread_name), - "lcore-worker-%d", i); + "rte-worker-%d", i); ret = rte_thread_setname(lcore_config[i].thread_id, thread_name); if (ret != 0) -- 2.27.0