From patchwork Wed Sep 6 16:12:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 131201 X-Patchwork-Delegate: thomas@monjalon.net 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 F39A742529; Wed, 6 Sep 2023 18:23:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 89CAA402D9; Wed, 6 Sep 2023 18:23:18 +0200 (CEST) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id 06198402D5 for ; Wed, 6 Sep 2023 18:23:17 +0200 (CEST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id D671C32009C2; Wed, 6 Sep 2023 12:23:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 06 Sep 2023 12:23:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1694017395; x= 1694103795; bh=0lpDfhHwjfLZK1JilIzChNCZ4EeSH9bmTDe7CCJ/rWE=; b=P hZsidOna5AyYOTpO7aRgRk4lYyXhLg/qADs/YghgkryUejMuQ4jgj44NFO41Pai+ 90NB3vsHVqErss3Q0XbjgRnqamRib1SIK1R4exGKyPjP7bSQbxC5teJ4lYzIce4I r+Du3hpfXOYNzb402uB5ksKkwlsKSqHMuj87pIo2mrkja7tlfzpBYlp/eGASWK++ OnbpY8YEIGl1zVx6cQGgkCulqTTT+JKEFcSJvE6nI6NhVoUSedeRaVq1jM6a0NHE JZeXxZMaECXhlkiEscub2uiffwFEZFwqfgj9g9GdyXG3G8bJZo5pUOhhbbMDxN7a EfhjErR6OUOxvkkjYpbzg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1694017395; x= 1694103795; bh=0lpDfhHwjfLZK1JilIzChNCZ4EeSH9bmTDe7CCJ/rWE=; b=G LnVGJtj7JPmJ2X6NNIBYxLWfQkE6lU47T5fRxeVbv7LNvK10oync41V26dqwYT7X zwAeNSU2vU1itrgPKit16ylYzEGfDh6L5BUZ9dKojO9v6P1T6SSijrixxB2Jcfj4 GGAFlnV3a54lZlCCE4f6dikjGV10mZn4tp41MIKgVrFpaKu3lK4JXn1T/IGWFA7d Qog5Xry0QKE5Pk4Y39svnGf34PSQaCGaIdO+yJ83kVwCXhDt69eNa57byQkUiN0Z NggDqjZr+wtA0kMiWz5gMKp9HPzQPiCUZtDxlf+O84IZSx4z+L7b9VDCBH8dJYnb ySmRp6TGSVoXPxVaZHYiw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehfedgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedvjefhudeghedvtdeijeeigeetuedugfejueekieeltdfhteev keehhfeilefhtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Sep 2023 12:23:14 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: Tyler Retzlaff , David Marchand , Ferruh Yigit Subject: [PATCH 04/11] eal: promote thread API as stable Date: Wed, 6 Sep 2023 18:12:21 +0200 Message-ID: <20230906162226.1618088-5-thomas@monjalon.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230906162226.1618088-1-thomas@monjalon.net> References: <20230906162226.1618088-1-thomas@monjalon.net> 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 The rte_thread API must be used to ease OS porting. One step of this process is to mark the necessary API as stable. Signed-off-by: Thomas Monjalon Acked-by: Tyler Retzlaff --- doc/guides/rel_notes/release_23_11.rst | 1 + lib/eal/include/rte_thread.h | 64 -------------------------- lib/eal/version.map | 40 ++++++++-------- 3 files changed, 20 insertions(+), 85 deletions(-) diff --git a/doc/guides/rel_notes/release_23_11.rst b/doc/guides/rel_notes/release_23_11.rst index d3d500f294..d7562fd646 100644 --- a/doc/guides/rel_notes/release_23_11.rst +++ b/doc/guides/rel_notes/release_23_11.rst @@ -115,6 +115,7 @@ API Changes * eal: The thread API has changed. The function ``rte_thread_create_control()`` does not take attributes anymore. + The whole thread API was promoted to stable level. ABI Changes diff --git a/lib/eal/include/rte_thread.h b/lib/eal/include/rte_thread.h index 28cc5220a4..dd1f62523f 100644 --- a/lib/eal/include/rte_thread.h +++ b/lib/eal/include/rte_thread.h @@ -73,9 +73,6 @@ typedef struct { typedef struct eal_tls_key *rte_thread_key; /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Create a new thread that will invoke the 'thread_func' routine. * * @param thread_id @@ -94,15 +91,11 @@ typedef struct eal_tls_key *rte_thread_key; * On success, return 0. * On failure, return a positive errno-style error number. */ -__rte_experimental int rte_thread_create(rte_thread_t *thread_id, const rte_thread_attr_t *thread_attr, rte_thread_func thread_func, void *arg); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Create a control thread. * * Creates a control thread with the given name and attributes. The @@ -124,15 +117,11 @@ int rte_thread_create(rte_thread_t *thread_id, * On success, returns 0; on error, it returns a negative value * corresponding to the error number. */ -__rte_experimental int rte_thread_create_control(rte_thread_t *thread, const char *name, rte_thread_func thread_func, void *arg); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Waits for the thread identified by 'thread_id' to terminate * * @param thread_id @@ -145,13 +134,9 @@ rte_thread_create_control(rte_thread_t *thread, const char *name, * On success, return 0. * On failure, return a positive errno-style error number. */ -__rte_experimental int rte_thread_join(rte_thread_t thread_id, uint32_t *value_ptr); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Indicate that the return value of the thread is not needed and * all thread resources should be release when the thread terminates. * @@ -162,25 +147,17 @@ int rte_thread_join(rte_thread_t thread_id, uint32_t *value_ptr); * On success, return 0. * On failure, return a positive errno-style error number. */ -__rte_experimental int rte_thread_detach(rte_thread_t thread_id); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Get the id of the calling thread. * * @return * Return the thread id of the calling thread. */ -__rte_experimental rte_thread_t rte_thread_self(void); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Set the name of the thread. * This API is a noop if the underlying platform does not * support setting the thread name or the platform-specific @@ -193,14 +170,10 @@ rte_thread_t rte_thread_self(void); * The name to set. Truncated to RTE_THREAD_NAME_SIZE, * including terminating NUL if necessary. */ -__rte_experimental void rte_thread_set_name(rte_thread_t thread_id, const char *thread_name); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Check if 2 thread ids are equal. * * @param t1 @@ -213,13 +186,9 @@ rte_thread_set_name(rte_thread_t thread_id, const char *thread_name); * If the ids are equal, return nonzero. * Otherwise, return 0. */ -__rte_experimental int rte_thread_equal(rte_thread_t t1, rte_thread_t t2); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Initialize the attributes of a thread. * These attributes can be passed to the rte_thread_create() function * that will create a new thread and set its attributes according to attr. @@ -231,13 +200,9 @@ int rte_thread_equal(rte_thread_t t1, rte_thread_t t2); * On success, return 0. * On failure, return a positive errno-style error number. */ -__rte_experimental int rte_thread_attr_init(rte_thread_attr_t *attr); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Set the thread priority value in the thread attributes pointed to * by 'thread_attr'. * @@ -251,16 +216,12 @@ int rte_thread_attr_init(rte_thread_attr_t *attr); * On success, return 0. * On failure, return a positive errno-style error number. */ -__rte_experimental int rte_thread_attr_set_priority(rte_thread_attr_t *thread_attr, enum rte_thread_priority priority); #ifdef RTE_HAS_CPUSET /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Set the CPU affinity value in the thread attributes pointed to * by 'thread_attr'. * @@ -274,14 +235,10 @@ int rte_thread_attr_set_priority(rte_thread_attr_t *thread_attr, * On success, return 0. * On failure, return a positive errno-style error number. */ -__rte_experimental int rte_thread_attr_set_affinity(rte_thread_attr_t *thread_attr, rte_cpuset_t *cpuset); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Get the value of CPU affinity that is set in the thread attributes pointed * to by 'thread_attr'. * @@ -295,14 +252,10 @@ int rte_thread_attr_set_affinity(rte_thread_attr_t *thread_attr, * On success, return 0. * On failure, return a positive errno-style error number. */ -__rte_experimental int rte_thread_attr_get_affinity(rte_thread_attr_t *thread_attr, rte_cpuset_t *cpuset); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Set the affinity of thread 'thread_id' to the cpu set * specified by 'cpuset'. * @@ -316,14 +269,10 @@ int rte_thread_attr_get_affinity(rte_thread_attr_t *thread_attr, * On success, return 0. * On failure, return a positive errno-style error number. */ -__rte_experimental int rte_thread_set_affinity_by_id(rte_thread_t thread_id, const rte_cpuset_t *cpuset); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Get the affinity of thread 'thread_id' and store it * in 'cpuset'. * @@ -337,7 +286,6 @@ int rte_thread_set_affinity_by_id(rte_thread_t thread_id, * On success, return 0. * On failure, return a positive errno-style error number. */ -__rte_experimental int rte_thread_get_affinity_by_id(rte_thread_t thread_id, rte_cpuset_t *cpuset); @@ -364,9 +312,6 @@ void rte_thread_get_affinity(rte_cpuset_t *cpusetp); #endif /* RTE_HAS_CPUSET */ /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Get the priority of a thread. * * @param thread_id @@ -379,14 +324,10 @@ void rte_thread_get_affinity(rte_cpuset_t *cpusetp); * On success, return 0. * On failure, return a positive errno-style error number. */ -__rte_experimental int rte_thread_get_priority(rte_thread_t thread_id, enum rte_thread_priority *priority); /** - * @warning - * @b EXPERIMENTAL: this API may change without prior notice. - * * Set the priority of a thread. * * @param thread_id @@ -399,7 +340,6 @@ int rte_thread_get_priority(rte_thread_t thread_id, * On success, return 0. * On failure, return a positive errno-style error number. */ -__rte_experimental int rte_thread_set_priority(rte_thread_t thread_id, enum rte_thread_priority priority); @@ -421,7 +361,6 @@ int rte_thread_set_priority(rte_thread_t thread_id, * ENOEXEC - Specific OS error. */ -__rte_experimental int rte_thread_key_create(rte_thread_key *key, void (*destructor)(void *)); @@ -437,7 +376,6 @@ int rte_thread_key_create(rte_thread_key *key, * rte_errno can be: EINVAL - Invalid parameter passed. * ENOEXEC - Specific OS error. */ -__rte_experimental int rte_thread_key_delete(rte_thread_key key); /** @@ -454,7 +392,6 @@ int rte_thread_key_delete(rte_thread_key key); * rte_errno can be: EINVAL - Invalid parameter passed. * ENOEXEC - Specific OS error. */ -__rte_experimental int rte_thread_value_set(rte_thread_key key, const void *value); /** @@ -469,7 +406,6 @@ int rte_thread_value_set(rte_thread_key key, const void *value); * rte_errno can be: EINVAL - Invalid parameter passed. * ENOEXEC - Specific OS error. */ -__rte_experimental void *rte_thread_value_get(rte_thread_key key); #ifdef __cplusplus diff --git a/lib/eal/version.map b/lib/eal/version.map index 7940431e5a..33b853d7be 100644 --- a/lib/eal/version.map +++ b/lib/eal/version.map @@ -257,12 +257,31 @@ DPDK_24 { rte_strscpy; rte_strsplit; rte_sys_gettid; + rte_thread_attr_get_affinity; + rte_thread_attr_init; + rte_thread_attr_set_affinity; + rte_thread_attr_set_priority; + rte_thread_create; + rte_thread_create_control; + rte_thread_detach; + rte_thread_equal; rte_thread_get_affinity; + rte_thread_get_affinity_by_id; + rte_thread_get_priority; rte_thread_is_intr; + rte_thread_join; + rte_thread_key_create; + rte_thread_key_delete; rte_thread_register; + rte_thread_self; rte_thread_set_affinity; + rte_thread_set_affinity_by_id; + rte_thread_set_name; + rte_thread_set_priority; rte_thread_setname; rte_thread_unregister; + rte_thread_value_get; + rte_thread_value_set; rte_uuid_compare; rte_uuid_is_null; rte_uuid_parse; @@ -368,10 +387,6 @@ EXPERIMENTAL { # added in 21.05 rte_devargs_reset; rte_intr_callback_unregister_sync; - rte_thread_key_create; - rte_thread_key_delete; - rte_thread_value_get; - rte_thread_value_set; rte_version_minor; rte_version_month; rte_version_prefix; @@ -392,26 +407,9 @@ EXPERIMENTAL { # added in 22.07 rte_drand; - rte_thread_get_affinity_by_id; - rte_thread_get_priority; - rte_thread_self; - rte_thread_set_affinity_by_id; - rte_thread_set_priority; - - # added in 22.11 - rte_thread_attr_get_affinity; - rte_thread_attr_init; - rte_thread_attr_set_affinity; - rte_thread_attr_set_priority; - rte_thread_create; - rte_thread_detach; - rte_thread_equal; - rte_thread_join; # added in 23.03 rte_lcore_register_usage_cb; - rte_thread_create_control; - rte_thread_set_name; __rte_eal_trace_generic_blob; # added in 23.07