Skip to content

fix race in rte_thread_create failure path

Tyler Retzlaff dpdk-dev 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 4 repliesIn review
  2. v4 posting 2/22 patches 0 repliesSuperseded
  3. v4 posting 1/22 patches 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v32 patches0 repliesSuperseded
v22 patches7 repliesSuperseded

Changes in v5 from the cover letter

* refactor patch to use pthread_cond_t to wait for thread start wrapper to complete work.
* rename some variables to group those that are part of the wrapper synchronization.
* use stack instead of heap allocation for thread start context.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2eal: make cpusetp to rte thread set affinity constlib/eal/common/eal_common_thread.c lib/eal/include/rte_thread.h+4 -40 replies
2/2eal: fix failure path race setting new thread affinitylib/eal/unix/rte_thread.c+43 -274 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/2] fix race in rte_thread_create failure path

v5:
* refactor patch to use pthread_cond_t to wait for thread start wrapper to complete work.
* rename some variables to group those that are part of the wrapper synchronization.
* use stack instead of heap allocation for thread start context.

v4:
* style fixes reported by CI

v3:
* don't free wrapper context from new thread now that wrapper completion is complete before returning from creating thread.

v2:
* new approach over v1 of the patch to avoid using pthread np API that is not available on Alpine Linux.
* to conform to rte_thread_create parameter const qualification include an additional patch to const qualify rte_thread_set_affinity cpusetp parameter.

Tyler Retzlaff (2):
eal: make cpusetp to rte thread set affinity const
eal: fix failure path race setting new thread affinity

 lib/eal/common/eal_common_thread.c |  6 ++--
 lib/eal/include/rte_thread.h       |  2 +-
 lib/eal/unix/rte_thread.c          | 70 +++++++++++++++++++++++---------------
 3 files changed, 47 insertions(+), 31 deletions(-)
Signature · 1 line
1.8.3.1