mbox

[v3,0/4] add eal functions for thread affinity and self

Message ID 1649835795-9344-1-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
Headers

Message

Tyler Retzlaff April 13, 2022, 7:43 a.m. UTC
  this series provides basic dependencies for additional eal thread api
additions. series includes

* basic platform error number conversion.
* function to get current thread identifier.
* functions to get and set affinity with platform agnostic thread
  identifier.
* minimal unit test of get and set affinity demonstrating usage.

note: previous series introducing these functions is now superseded by
this series.
http://patches.dpdk.org/project/dpdk/list/?series=20472&state=*

Tyler Retzlaff (4):
  eal/windows: translate Windows errors to errno-style errors
  eal: add basic thread ID and current thread identifier API
  eal: implement functions for get/set thread affinity
  test/threads: add unit test for thread API

v3:
* fix memory leak on eal_create_cpu_map error paths.

v2:
* add missing boilerplate comments warning of experimental api
  for rte_thread_{set,get}_affinity_by_id().
* don't break literal format string to log_early to improve
  searchability.
* fix multi-line comment style to match file.
* return ENOTSUP instead of EINVAL from rte_convert_cpuset_to_affinity()
  if cpus in set are not part of the same processor group and note
  limitation in commit message.
* expand series to include rte_thread_self().
* modify unit test to remove use of implementation detail and
  get thread identifier use added rte_thread_self().
* move literal value to rhs when using memcmp in RTE_TEST_ASSERT

Tyler Retzlaff (4):
  eal/windows: translate Windows errors to errno-style errors
  eal: add basic thread ID and current thread identifier API
  eal: implement functions for get/set thread affinity
  test/threads: add unit test for thread API

 app/test/meson.build             |   2 +
 app/test/test_threads.c          |  89 ++++++++++++++++++
 lib/eal/include/rte_thread.h     |  64 +++++++++++++
 lib/eal/unix/rte_thread.c        |  27 ++++++
 lib/eal/version.map              |   5 ++
 lib/eal/windows/eal_lcore.c      | 181 +++++++++++++++++++++++++++----------
 lib/eal/windows/eal_windows.h    |  10 +++
 lib/eal/windows/include/rte_os.h |   2 +
 lib/eal/windows/rte_thread.c     | 190 ++++++++++++++++++++++++++++++++++++++-
 9 files changed, 522 insertions(+), 48 deletions(-)
 create mode 100644 app/test/test_threads.c