[04/11] eal: promote thread API as stable

Message ID 20230906162226.1618088-5-thomas@monjalon.net (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series rework thread management |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon Sept. 6, 2023, 4:12 p.m. UTC
  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(-)
  

Comments

Tyler Retzlaff Sept. 8, 2023, 4:04 a.m. UTC | #1
On Wed, Sep 06, 2023 at 06:12:21PM +0200, Thomas Monjalon wrote:
> 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>
> ---
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
  

Patch

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