DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: Tyler Retzlaff <roretzla@linux.microsoft.com>,
	David Marchand <david.marchand@redhat.com>,
	Ferruh Yigit <ferruh.yigit@amd.com>
Subject: [PATCH 04/11] eal: promote thread API as stable
Date: Wed,  6 Sep 2023 18:12:21 +0200	[thread overview]
Message-ID: <20230906162226.1618088-5-thomas@monjalon.net> (raw)
In-Reply-To: <20230906162226.1618088-1-thomas@monjalon.net>

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 <thomas@monjalon.net>
---
 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
-- 
2.42.0


  parent reply	other threads:[~2023-09-06 16:23 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 16:12 [PATCH 00/11] rework thread management Thomas Monjalon
2023-09-06 16:12 ` [PATCH 01/11] devtools: warn when adding some pthread calls Thomas Monjalon
2023-09-07  8:20   ` David Marchand
2023-09-06 16:12 ` [PATCH 02/11] eal: rename thread name length definition Thomas Monjalon
2023-09-08  4:00   ` Tyler Retzlaff
2023-09-06 16:12 ` [PATCH 03/11] eal: remove attributes from control thread creation Thomas Monjalon
2023-09-08  4:02   ` Tyler Retzlaff
2023-09-06 16:12 ` Thomas Monjalon [this message]
2023-09-08  4:04   ` [PATCH 04/11] eal: promote thread API as stable Tyler Retzlaff
2023-09-06 16:12 ` [PATCH 05/11] eal: force prefix for internal threads Thomas Monjalon
2023-09-07  8:28   ` David Marchand
2023-09-07  8:50     ` Morten Brørup
2023-09-07  8:53       ` David Marchand
2023-09-07  8:55         ` David Marchand
2023-09-07 11:10           ` Morten Brørup
2023-09-11 16:26             ` Thomas Monjalon
2023-09-11 21:32               ` Morten Brørup
2023-09-06 16:12 ` [PATCH 06/11] lib: convert to internal control threads Thomas Monjalon
2023-09-06 16:12 ` [PATCH 07/11] drivers: " Thomas Monjalon
2023-09-11 13:35   ` Andrew Rybchenko
2023-09-06 16:12 ` [PATCH 08/11] examples: convert to normal " Thomas Monjalon
2023-09-08  4:10   ` Tyler Retzlaff
2023-09-06 16:12 ` [PATCH 09/11] test: convert threads creation Thomas Monjalon
2023-09-08  4:12   ` Tyler Retzlaff
2023-09-06 16:12 ` [PATCH 10/11] eal: remove deprecated thread functions Thomas Monjalon
2023-09-08  4:22   ` Tyler Retzlaff
2023-09-11 16:13     ` Thomas Monjalon
2023-09-12  0:49       ` Tyler Retzlaff
2023-09-06 16:12 ` [PATCH 11/11] lib: remove pthread.h from includes Thomas Monjalon
2023-09-08  4:25   ` Tyler Retzlaff
2023-09-08  4:49     ` Ajit Khaparde
2023-09-10  2:55   ` Xu, Rosen
2023-09-07  8:30 ` [PATCH 00/11] rework thread management Morten Brørup
2023-09-08  4:26   ` Tyler Retzlaff
2023-09-13 10:34 ` [PATCH v2 " Thomas Monjalon
2023-09-13 10:34   ` [PATCH v2 01/11] devtools: warn when adding some pthread calls Thomas Monjalon
2023-09-13 10:34   ` [PATCH v2 02/11] eal: rename thread name length definition Thomas Monjalon
2023-09-13 10:34   ` [PATCH v2 03/11] eal: remove attributes from control thread creation Thomas Monjalon
2023-09-13 10:34   ` [PATCH v2 04/11] eal: promote thread API as stable Thomas Monjalon
2023-09-13 10:34   ` [PATCH v2 05/11] eal: force prefix for internal threads Thomas Monjalon
2023-09-13 10:34   ` [PATCH v2 06/11] lib: convert to internal control threads Thomas Monjalon
2023-09-13 10:34   ` [PATCH v2 07/11] drivers: " Thomas Monjalon
2023-09-13 10:34   ` [PATCH v2 08/11] examples: convert to normal " Thomas Monjalon
2023-09-13 10:34   ` [PATCH v2 09/11] test: convert threads creation Thomas Monjalon
2023-09-13 10:34   ` [PATCH v2 10/11] eal: remove deprecated thread functions Thomas Monjalon
2023-09-13 10:34   ` [PATCH v2 11/11] lib: remove pthread.h from includes Thomas Monjalon
2023-09-13 11:28 ` [PATCH v3 00/11] rework thread management Thomas Monjalon
2023-09-13 11:28   ` [PATCH v3 01/11] devtools: warn when adding some pthread calls Thomas Monjalon
2023-09-13 11:28   ` [PATCH v3 02/11] eal: rename thread name length definition Thomas Monjalon
2023-09-13 11:28   ` [PATCH v3 03/11] eal: remove attributes from control thread creation Thomas Monjalon
2023-09-13 11:28   ` [PATCH v3 04/11] eal: promote thread API as stable Thomas Monjalon
2023-09-13 11:28   ` [PATCH v3 05/11] eal: force prefix for internal threads Thomas Monjalon
2023-09-13 11:28   ` [PATCH v3 06/11] lib: convert to internal control threads Thomas Monjalon
2023-09-13 11:28   ` [PATCH v3 07/11] drivers: " Thomas Monjalon
2023-09-13 11:28   ` [PATCH v3 08/11] examples: convert to normal " Thomas Monjalon
2023-09-13 11:28   ` [PATCH v3 09/11] test: convert threads creation Thomas Monjalon
2023-09-13 11:28   ` [PATCH v3 10/11] eal: remove deprecated thread functions Thomas Monjalon
2023-09-13 11:28   ` [PATCH v3 11/11] lib: remove pthread.h from includes Thomas Monjalon
2023-09-17 12:26   ` [PATCH v3 00/11] rework thread management Konstantin Ananyev
2023-09-22 13:46   ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230906162226.1618088-5-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=roretzla@linux.microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).