From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B9F6BA0C43; Wed, 18 Aug 2021 15:44:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C165411D2; Wed, 18 Aug 2021 15:44:17 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id ADA0340151 for ; Wed, 18 Aug 2021 15:44:14 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1059) id EDB7520C3251; Wed, 18 Aug 2021 06:44:13 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EDB7520C3251 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1629294253; bh=0A/BxO3jhzTQbdU9QthhjUFM1gKh1I7r/9Yp92A+axM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mm7YjcK/1Zr9ytCcauY/+Acq4AlxGIXH6m4FmcTbmS+AA2VAks4ZRXnvbykXJZb9z 1hhsmownt5RqxsqU7xwFYBPLPkvsCmq82fm9aalikyfIsKhq6W7eMBbTe28sXgixAM N7KiisEQHdgOAUx43NM3Ug2rOFQ0xGeBf56yrbVA= From: Narcisa Ana Maria Vasile To: dev@dpdk.org, thomas@monjalon.net, dmitry.kozliuk@gmail.com, khot@microsoft.com, navasile@microsoft.com, dmitrym@microsoft.com, roretzla@microsoft.com, talshn@nvidia.com, ocardona@microsoft.com Cc: bruce.richardson@intel.com, david.marchand@redhat.com, pallavi.kadam@intel.com Date: Wed, 18 Aug 2021 06:44:01 -0700 Message-Id: <1629294247-5207-1-git-send-email-navasile@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1624067878-2130-1-git-send-email-navasile@linux.microsoft.com> References: <1624067878-2130-1-git-send-email-navasile@linux.microsoft.com> Subject: [dpdk-dev] [PATCH v3 0/6] Enable the internal EAL thread API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Narcisa Vasile 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") 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 | 68 +++++++ 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, 777 insertions(+), 661 deletions(-) delete mode 100644 lib/eal/windows/include/pthread.h -- 2.31.0.vfs.0.1