mbox series

[v6,0/5] add rte_thread_set_name API for rte_thread_t

Message ID 1674071646-6854-1-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
Headers
Series add rte_thread_set_name API for rte_thread_t |

Message

Tyler Retzlaff Jan. 18, 2023, 7:54 p.m. UTC
  Replace the rte_thread_setname API which operates on pthread_t with
rte_thread_set_name that operates on rte_thread_t.

We should try to align tracing output from the EAL for all platforms
but in this case we are retaining an exception for linux as requested
from the community.

v6:
  * clean up commit descriptions
  * add patch to set worker thread name on windows
  * remove __rte_deprecated from rte_thread_setname

v5:
  * rename rte_thread_getname -> thread_get_name

v4:
  * retain and move rte_thread_getname function to the
    single site of use

v3:
  * fix coding style error
  * move remove of rte_thread_getname to patch #2

v2:
  * initial series provided get/set for lcore thread id, those
    additions have been removed as per discussion. including
    unit test
  * add a single api rte_thread_set_name does not fail but emits
    debug logging if the internal implementation is aware of
    in-exact use of the name or failure to set the name
  * adapt mlx5 driver to avoid use of deprecated API

Tyler Retzlaff (5):
  eal: add thread set name API operating on rte thread
  eal: remove thread getname API
  eal: set thread name on Windows worker threads
  drivers: mlx5 use rte thread set name
  eal: deprecation notice for rte thread setname API

Series-acked-by: Morten Brørup <mb@smartsharesystems.com>

 doc/guides/rel_notes/deprecation.rst |  4 ++++
 drivers/net/mlx5/mlx5_hws_cnt.c      |  3 ++-
 drivers/vdpa/mlx5/mlx5_vdpa_event.c  |  3 +--
 lib/eal/common/eal_common_thread.c   |  8 ++-----
 lib/eal/common/eal_common_trace.c    | 15 +++++++++++-
 lib/eal/freebsd/eal.c                |  3 +--
 lib/eal/freebsd/eal_thread.c         | 20 +++++++++-------
 lib/eal/include/rte_lcore.h          | 17 -------------
 lib/eal/include/rte_thread.h         | 17 +++++++++++++
 lib/eal/linux/eal.c                  |  6 +----
 lib/eal/linux/eal_thread.c           | 29 ++++++++++++++---------
 lib/eal/version.map                  |  4 +++-
 lib/eal/windows/eal.c                |  7 ++++++
 lib/eal/windows/rte_thread.c         | 46 ++++++++++++++++++++++++++++++++++++
 14 files changed, 127 insertions(+), 55 deletions(-)
  

Comments

David Marchand Jan. 22, 2023, 1:55 p.m. UTC | #1
On Wed, Jan 18, 2023 at 8:54 PM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> Replace the rte_thread_setname API which operates on pthread_t with
> rte_thread_set_name that operates on rte_thread_t.
>
> We should try to align tracing output from the EAL for all platforms
> but in this case we are retaining an exception for linux as requested
> from the community.
>
> v6:
>   * clean up commit descriptions
>   * add patch to set worker thread name on windows
>   * remove __rte_deprecated from rte_thread_setname

The unit tests are failing in the UNH Windows env though it was fine with v5.
https://lab.dpdk.org/results/dashboard/patchsets/25031/

 1/91 DPDK:fast-tests / acl_autotest                   FAIL
 1.05s   (exit status 3221225477 or signal 3221225349 SIGinvalid)
06:02:25 MALLOC_PERTURB_=92 DPDK_TEST=acl_autotest
C:\Users\builder\jenkins\workspace\Generic-VM-Unit-Test-DPDK\dpdk\build\app\test\dpdk-test.exe
----------------------------------- output -----------------------------------
stderr:
EAL: Detected CPU lcores: 4

EAL: Detected NUMA nodes: 1

EAL: Multi-process support is requested, but not available.

------------------------------------------------------------------------------

Could you have a look?
Thanks.
  
Tyler Retzlaff Jan. 23, 2023, 6:57 p.m. UTC | #2
On Sun, Jan 22, 2023 at 02:55:18PM +0100, David Marchand wrote:
> On Wed, Jan 18, 2023 at 8:54 PM Tyler Retzlaff
> <roretzla@linux.microsoft.com> wrote:
> >
> > Replace the rte_thread_setname API which operates on pthread_t with
> > rte_thread_set_name that operates on rte_thread_t.
> >
> > We should try to align tracing output from the EAL for all platforms
> > but in this case we are retaining an exception for linux as requested
> > from the community.
> >
> > v6:
> >   * clean up commit descriptions
> >   * add patch to set worker thread name on windows
> >   * remove __rte_deprecated from rte_thread_setname
> 
> The unit tests are failing in the UNH Windows env though it was fine with v5.
> https://lab.dpdk.org/results/dashboard/patchsets/25031/
> 
>  1/91 DPDK:fast-tests / acl_autotest                   FAIL
>  1.05s   (exit status 3221225477 or signal 3221225349 SIGinvalid)
> 06:02:25 MALLOC_PERTURB_=92 DPDK_TEST=acl_autotest
> C:\Users\builder\jenkins\workspace\Generic-VM-Unit-Test-DPDK\dpdk\build\app\test\dpdk-test.exe
> ----------------------------------- output -----------------------------------
> stderr:
> EAL: Detected CPU lcores: 4
> 
> EAL: Detected NUMA nodes: 1
> 
> EAL: Multi-process support is requested, but not available.
> 
> ------------------------------------------------------------------------------
> 
> Could you have a look?

it's a bug in the windows implementation, v7 will be submitted to fix
it.

thankfully you asked for the eal worker thread initialization to be made
consistent with freebsd/linux. it was that change that caused the
failure to be exposed in this revision of the series.

thank you.