Skip to content

RFC get rid of pthread_cancel

Stephen Hemminger dpdk-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6eal: avoid using pthread_cancellib/eal/common/eal_common_proc.c+6 -180 replies
2/6eventdev: avoid use of pthread_cancellib/eventdev/rte_event_eth_rx_adapter.c+11 -100 replies
3/6raw/ifpga: avoid use of pthread_canceldrivers/raw/ifpga/ifpga_rawdev.c+1 -71 reply
4/6dma/skeleton: avoid use of pthread_canceldrivers/dma/skeleton/skeleton_dmadev.c+1 -41 reply
5/6intel/ipn3ke: avoid use of pthread_canceldrivers/net/intel/ipn3ke/ipn3ke_representor.c+2 -61 reply
6/6intel/iavf: remove use of pthread_canceldrivers/net/intel/iavf/iavf_vchnl.c+4 -41 reply

Reviews trailers per patch

4 of 6 patches have a Reviewed-by or Acked-by.

PatchChengwen FengBruce RichardsonRosen Xu
1/6
2/6
3/6R-b
4/6A-b
5/6R-b
6/6A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [RFC 0/6] get rid of pthread_cancel

The use of pthread_cancel in DPDK is problematic since cancel is implemented as signal in Linux and TerminateThread in Windows. Using pthread_cancel also exposes the internals of rte_thread_t to drivers which limits potential ABI changes.

This patchset shows how the same effect can be had in most places by using either existing flag variables or the semantics of sockets/pipes used to communicate with the thread.

This RFC because it doesn't cover all uses of pthread_cancel, in the final version pthread_cancel will be gone and flagged as error in checkpatch; and the patches hit multiple drivers which require special hardware.

Stephen Hemminger (6):
eal: avoid using pthread_cancel
eventdev: avoid use of pthread_cancel
raw/ifpga: avoid use of pthread_cancel
dma/skeleton: avoid use of pthread_cancel
intel/ipn3ke: avoid use of pthread_cancel
intel/iavf: remove use of pthread_cancel

 drivers/dma/skeleton/skeleton_dmadev.c        |  5 +---
 drivers/net/intel/iavf/iavf_vchnl.c           |  8 +++----
 drivers/net/intel/ipn3ke/ipn3ke_representor.c |  8 ++-----
 drivers/raw/ifpga/ifpga_rawdev.c              |  8 +------
 lib/eal/common/eal_common_proc.c              | 24 +++++--------------
 lib/eventdev/rte_event_eth_rx_adapter.c       | 21 ++++++++--------
 6 files changed, 25 insertions(+), 49 deletions(-)
Signature · 1 line
2.47.3