[v5,4/4] eal: deprecate rte thread setname API

Message ID 1673979709-8613-5-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series add rte_thread_set_name API for rte_thread_t |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Tyler Retzlaff Jan. 17, 2023, 6:21 p.m. UTC
  Notify deprecation of rte_thread_setname API, it is being removed as it
exposes platform-specific thread details. The functionality it provided
is now implicitly provided via the rte_lcore_set_name API if the
underlying platform supports it.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 doc/guides/rel_notes/deprecation.rst | 4 ++++
 lib/eal/include/rte_lcore.h          | 2 ++
 2 files changed, 6 insertions(+)
  

Comments

David Marchand Jan. 18, 2023, 11:49 a.m. UTC | #1
On Tue, Jan 17, 2023 at 7:21 PM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> Notify deprecation of rte_thread_setname API, it is being removed as it
> exposes platform-specific thread details. The functionality it provided
> is now implicitly provided via the rte_lcore_set_name API if the
> underlying platform supports it.
>
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

I counted one ack from Morten.
With mine (for the notice part, see comment below), that makes two.
Acked-by: David Marchand <david.marchand@redhat.com>

We need one more ack (Cc: techboard, hoping that some kind member will ack).


> ---
>  doc/guides/rel_notes/deprecation.rst | 4 ++++
>  lib/eal/include/rte_lcore.h          | 2 ++
>  2 files changed, 6 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index e18ac34..2990bb1 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -126,3 +126,7 @@ Deprecation Notices
>    Its removal has been postponed to let potential users report interest
>    in maintaining it.
>    In the absence of such interest, this library will be removed in DPDK 23.11.
> +
> +* eal: The function ``rte_thread_setname`` will be removed, continuing
> +  the effort to decouple EAL from platform-specific thread
> +  implementations.
> diff --git a/lib/eal/include/rte_lcore.h b/lib/eal/include/rte_lcore.h
> index 9c78650..2fb3091 100644
> --- a/lib/eal/include/rte_lcore.h
> +++ b/lib/eal/include/rte_lcore.h
> @@ -13,6 +13,7 @@
>   */
>  #include <stdio.h>
>
> +#include <rte_common.h>
>  #include <rte_compat.h>
>  #include <rte_config.h>
>  #include <rte_per_lcore.h>
> @@ -349,6 +350,7 @@ enum rte_lcore_role_t {
>   * @return
>   *   On success, return 0; otherwise return a negative value.
>   */
> +__rte_deprecated
>  int rte_thread_setname(pthread_t id, const char *name);

However, this part should be removed and postponed to when
rte_thread_set_name is marked stable.
As long as the set_name new symbol is experimental, we can't mark as
deprecated as users would be left with no stable API.
  

Patch

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index e18ac34..2990bb1 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -126,3 +126,7 @@  Deprecation Notices
   Its removal has been postponed to let potential users report interest
   in maintaining it.
   In the absence of such interest, this library will be removed in DPDK 23.11.
+
+* eal: The function ``rte_thread_setname`` will be removed, continuing
+  the effort to decouple EAL from platform-specific thread
+  implementations.
diff --git a/lib/eal/include/rte_lcore.h b/lib/eal/include/rte_lcore.h
index 9c78650..2fb3091 100644
--- a/lib/eal/include/rte_lcore.h
+++ b/lib/eal/include/rte_lcore.h
@@ -13,6 +13,7 @@ 
  */
 #include <stdio.h>
 
+#include <rte_common.h>
 #include <rte_compat.h>
 #include <rte_config.h>
 #include <rte_per_lcore.h>
@@ -349,6 +350,7 @@  enum rte_lcore_role_t {
  * @return
  *   On success, return 0; otherwise return a negative value.
  */
+__rte_deprecated
 int rte_thread_setname(pthread_t id, const char *name);
 
 /**