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 81ED0A00C4; Tue, 26 Apr 2022 09:50:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C3E440C35; Tue, 26 Apr 2022 09:50:51 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7742240691 for ; Tue, 26 Apr 2022 09:50:50 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id C53F620E8FB5; Tue, 26 Apr 2022 00:50:49 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C53F620E8FB5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1650959449; bh=6Vc9PySMaK8SEhMqv8QT9eOEpsgmhoX+TI/9DDmrljE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e47JiftMmc9n2bL2Qnmsmnho1CPTKELS3mVdSUIbWvb8fO8rMqdrOcIZXhSIB6d9P 0ehpUgfC+yjsQBF2lRkXwdzxEvLKkHqSYLcl0PK3qqJ3RNqeEcGe39tVKmDNMpFCR4 INnQJwssSzCCiXYdTJrZRpTP61dp8/tlEVJYj1P8= From: Tyler Retzlaff To: dev@dpdk.org Cc: thomas@monjalon.net, dmitry.kozliuk@gmail.com, anatoly.burakov@intel.com, Tyler Retzlaff Subject: [PATCH v4 0/3] add eal functions for thread affinity and self Date: Tue, 26 Apr 2022 00:50:39 -0700 Message-Id: <1650959442-29330-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1648819793-18948-1-git-send-email-roretzla@linux.microsoft.com> References: <1648819793-18948-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 this series provides basic dependencies for additional eal thread api additions. series includes * basic platform error number conversion. * function to get current thread identifier. * functions to get and set affinity with platform agnostic thread identifier. * minimal unit test of get and set affinity demonstrating usage. note: previous series introducing these functions is now superseded by this series. http://patches.dpdk.org/project/dpdk/list/?series=20472&state=* v4: * combine patch eal/windows: translate Windows errors to errno-style errors into eal: implement functions for get/set thread affinity patch. the former introduced static functions that were not used without eal: implement functions for get/set thread affinity which would cause a build break when applied standalone. * remove struct tag from rte_thread_t struct typedef. * remove rte_ prefix from rte_convert_cpuset_to_affinity static function. v3: * fix memory leak on eal_create_cpu_map error paths. v2: * add missing boilerplate comments warning of experimental api for rte_thread_{set,get}_affinity_by_id(). * don't break literal format string to log_early to improve searchability. * fix multi-line comment style to match file. * return ENOTSUP instead of EINVAL from rte_convert_cpuset_to_affinity() if cpus in set are not part of the same processor group and note limitation in commit message. * expand series to include rte_thread_self(). * modify unit test to remove use of implementation detail and get thread identifier use added rte_thread_self(). * move literal value to rhs when using memcmp in RTE_TEST_ASSERT Tyler Retzlaff (3): eal: add basic thread ID and current thread identifier API eal: implement functions for get/set thread affinity test/threads: add unit test for thread API app/test/meson.build | 2 + app/test/test_threads.c | 89 ++++++++++++++++++ lib/eal/include/rte_thread.h | 64 +++++++++++++ lib/eal/unix/rte_thread.c | 27 ++++++ lib/eal/version.map | 5 ++ lib/eal/windows/eal_lcore.c | 181 +++++++++++++++++++++++++++---------- lib/eal/windows/eal_windows.h | 10 +++ lib/eal/windows/include/rte_os.h | 2 + lib/eal/windows/rte_thread.c | 190 ++++++++++++++++++++++++++++++++++++++- 9 files changed, 522 insertions(+), 48 deletions(-) create mode 100644 app/test/test_threads.c -- 1.8.3.1