Skip to content

Enable the internal EAL thread API

Narcisa Ana Maria Vasile dpdk-dev 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 0 repliesNew
  2. v36 patches 1 replySuperseded
  3. v26 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v16 patches0 repliesSuperseded

Changes in v4 from the cover letter

- Free resources on error path
- Use RTE_FINI to unload kernel32.dll

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6eal: add function that sets thread namelib/eal/common/rte_thread.c lib/eal/include/rte_thread.h lib/eal/version.map +1 more+110 -00 replies
2/6eal: add function for control thread creationlib/eal/common/eal_common_thread.c lib/eal/include/rte_thread.h lib/eal/version.map+109 -00 replies
3/6Enable the new EAL thread API in app, drivers and examplesapp/test/process.h app/test/test_lcores.c app/test/test_link_bonding.c +59 more+342 -3470 replies
4/6lib: enable the new EAL thread APIlib/eal/common/eal_common_options.c lib/eal/common/eal_common_thread.c lib/eal/common/eal_common_trace.c +24 more+99 -1120 replies
5/6eal: set affinity and priority attributeslib/eal/common/eal_common_thread.c lib/eal/common/eal_thread.h lib/eal/freebsd/eal.c +2 more+125 -160 replies
6/6Allow choice between internal EAL thread API and external libconfig/meson.build lib/eal/windows/include/pthread.h lib/eal/windows/meson.build +1 more+8 -1940 replies

Reviews trailers per patch

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

Read the v4 thread

Cover letter [dpdk-dev] [PATCH v4 0/6] Enable the internal EAL thread API

From: Narcisa Vasile <[email protected]>

This patchset enables the new EAL thread API.
The newly defined thread attributes, priority and affinity, are used in eal/windows when creating the threads. Similarly, some changes have been done in eal/linux/eal.c and eal/freebsd/eal.c to initialize priority to a default value and set thread attributes.

The user is offered the option of either using the rte_thread_* API or a 3rd party thread library, through a meson flag
called "use_external_thread_lib".
By default, this flag is set to FALSE, which means Windows libraries and applications will use the EAL rte_thread_* API
defined in windows/rte_thread.c for managing threads.
When the flag is set to TRUE, the common/rte_thread.c file is compiled and an external thread library is used.

This patchset adds a new function for creating control threads that uses the new thread API.
It enables the usage of the new function in Windows code and common code. The old function is kept to avoid ABI break, however, its definition is commented away on Windows, since the pthread_t and pthread_attr_t arguments that it receives have been replaced with the new API on Windows. This allows testing the "eal: Add EAL API for threading" that this patchset depends on.

The ethdev lib also contains some changes that break the ABI. Enabling the new EAL thread API will probably require going through the proper process of ABI changes.

Depends-on: series-18172 ("eal: Add EAL API for threading")

v4:
- Free resources on error path
- Use RTE_FINI to unload kernel32.dll

v3:
- use RTE_INIT to only load kernel32.dll once and get function pointer to SetThreadDescription()
- minor fixes

v2:
- fix typo in SetThreadDescription_type function pointer
- add Depends-on on all patches to fix apply errors.
- modify cover letter

Narcisa Vasile (6):
eal: add function that sets thread name
eal: add function for control thread creation Enable the new EAL thread API in app, drivers and examples
lib: enable the new EAL thread API
eal: set affinity and priority attributes
Allow choice between internal EAL thread API and external lib

 app/test/process.h                            |   8 +-
 app/test/test_lcores.c                        |  18 +-
 app/test/test_link_bonding.c                  |  14 +-
 app/test/test_lpm_perf.c                      |  12 +-
 config/meson.build                            |   1 -
 drivers/bus/dpaa/base/qbman/bman_driver.c     |   5 +-
 drivers/bus/dpaa/base/qbman/dpaa_sys.c        |  14 +-
 drivers/bus/dpaa/base/qbman/process.c         |   6 +-
 drivers/bus/dpaa/dpaa_bus.c                   |  14 +-
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c      |  19 +-
 drivers/common/dpaax/compat.h                 |   2 +-
 drivers/common/mlx5/windows/mlx5_common_os.h  |   1 +
 drivers/compress/mlx5/mlx5_compress.c         |  14 +-
 drivers/event/dlb2/dlb2.c                     |   2 +-
 drivers/event/dlb2/pf/base/dlb2_osdep.h       |   7 +-
 drivers/mempool/dpaa/dpaa_mempool.c           |   2 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c           |  18 +-
 drivers/net/ark/ark_ethdev.c                  |   4 +-
 drivers/net/ark/ark_pktgen.c                  |   4 +-
 drivers/net/atlantic/atl_ethdev.c             |   4 +-
 drivers/net/atlantic/atl_types.h              |   4 +-
 .../net/atlantic/hw_atl/hw_atl_utils_fw2x.c   |  26 +--
 drivers/net/axgbe/axgbe_common.h              |   2 +-
 drivers/net/axgbe/axgbe_dev.c                 |   8 +-
 drivers/net/axgbe/axgbe_ethdev.c              |   8 +-
 drivers/net/axgbe/axgbe_ethdev.h              |   8 +-
 drivers/net/axgbe/axgbe_i2c.c                 |   4 +-
 drivers/net/axgbe/axgbe_mdio.c                |   8 +-
 drivers/net/axgbe/axgbe_phy_impl.c            |   6 +-
 drivers/net/bnxt/bnxt.h                       |  16 +-
 drivers/net/bnxt/bnxt_cpr.c                   |   4 +-
 drivers/net/bnxt/bnxt_ethdev.c                |  54 ++---
 drivers/net/bnxt/bnxt_irq.c                   |   8 +-
 drivers/net/bnxt/bnxt_reps.c                  |  10 +-
 drivers/net/bnxt/tf_ulp/bnxt_ulp.c            |  34 ++--
 drivers/net/bnxt/tf_ulp/bnxt_ulp.h            |   4 +-
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c          |  28 +--
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h          |   8 +-
 drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c          |   4 +-
 drivers/net/bnxt/tf_ulp/ulp_ha_mgr.h          |   2 +-
 drivers/net/dpaa/dpaa_ethdev.c                |   2 +-
 drivers/net/dpaa/dpaa_rxtx.c                  |   2 +-
 drivers/net/ena/base/ena_plat_dpdk.h          |  15 +-
 drivers/net/enic/enic.h                       |   2 +-
 drivers/net/ice/ice_dcf_parent.c              |   8 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |   6 +-
 drivers/net/ixgbe/ixgbe_ethdev.h              |   2 +-
 drivers/net/mlx5/linux/mlx5_os.c              |   2 +-
 drivers/net/mlx5/mlx5.c                       |  20 +-
 drivers/net/mlx5/mlx5.h                       |   2 +-
 drivers/net/mlx5/mlx5_txpp.c                  |   8 +-
 drivers/net/mlx5/windows/mlx5_flow_os.c       |  10 +-
 drivers/net/mlx5/windows/mlx5_os.c            |   2 +-
 drivers/net/qede/base/bcm_osal.h              |   8 +-
 drivers/net/vhost/rte_eth_vhost.c             |  24 +--
 .../net/virtio/virtio_user/virtio_user_dev.c  |  30 +--
 .../net/virtio/virtio_user/virtio_user_dev.h  |   2 +-
 drivers/vdpa/ifc/ifcvf_vdpa.c                 |  49 +++--
 drivers/vdpa/mlx5/mlx5_vdpa.c                 |  24 +--
 drivers/vdpa/mlx5/mlx5_vdpa.h                 |   4 +-
 drivers/vdpa/mlx5/mlx5_vdpa_event.c           |  51 ++---
 examples/kni/main.c                           |   1 +
 .../pthread_shim/pthread_shim.h               |   1 +
 lib/eal/common/eal_common_options.c           |   6 +-
 lib/eal/common/eal_common_thread.c            | 105 +++++++++-
 lib/eal/common/eal_common_trace.c             |   1 +
 lib/eal/common/eal_private.h                  |   2 +-
 lib/eal/common/eal_thread.h                   |   6 +
 lib/eal/common/malloc_mp.c                    |   2 +
 lib/eal/common/rte_thread.c                   |  17 ++
 lib/eal/freebsd/eal.c                         |  53 +++--
 lib/eal/freebsd/eal_alarm.c                   |  12 +-
 lib/eal/freebsd/eal_interrupts.c              |   6 +-
 lib/eal/freebsd/eal_thread.c                  |  10 +-
 lib/eal/include/rte_lcore.h                   |   6 +
 lib/eal/include/rte_per_lcore.h               |   2 +-
 lib/eal/include/rte_thread.h                  |  43 ++++
 lib/eal/linux/eal.c                           |  55 +++--
 lib/eal/linux/eal_alarm.c                     |  10 +-
 lib/eal/linux/eal_interrupts.c                |   8 +-
 lib/eal/linux/eal_thread.c                    |  11 +-
 lib/eal/linux/eal_timer.c                     |   6 +-
 lib/eal/version.map                           |   6 +-
 lib/eal/windows/eal.c                         |  44 +++-
 lib/eal/windows/eal_interrupts.c              |   8 +-
 lib/eal/windows/eal_thread.c                  |  35 +---
 lib/eal/windows/eal_windows.h                 |  10 -
 lib/eal/windows/include/pthread.h             | 192 ------------------
 lib/eal/windows/include/rte_windows.h         |   1 +
 lib/eal/windows/meson.build                   |   7 +-
 lib/eal/windows/rte_thread.c                  |  76 +++++++
 lib/ethdev/rte_ethdev.c                       |   4 +-
 lib/ethdev/rte_ethdev_core.h                  |   4 +-
 lib/ethdev/rte_flow.c                         |   4 +-
 lib/eventdev/rte_event_eth_rx_adapter.c       |   1 +
 lib/vhost/vhost.c                             |   1 +
 meson_options.txt                             |   2 +
 97 files changed, 785 insertions(+), 661 deletions(-)
 delete mode 100644 lib/eal/windows/include/pthread.h
Signature · 1 line
2.31.0.vfs.0.1