[dpdk-test-report] |WARNING| pw93730-93739 [PATCH] [v7, 10/10] Enable the new EAL thread API
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Jun 1 23:28:32 CEST 2021
Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/93730
_apply patch failure_
Submitter: Narcisa Ana Maria Vasile <navasile at linux.microsoft.com>
Date: Tuesday, June 01 2021 20:55:52
Applied on: CommitID:66b3a54b9feab193a5cf8ad54606d745078587cc
Apply patch set 93730-93739 failed:
Checking patch app/test/process.h...
Checking patch app/test/test_lcores.c...
Checking patch app/test/test_link_bonding.c...
Checking patch app/test/test_lpm_perf.c...
Checking patch config/meson.build...
Checking patch drivers/bus/dpaa/base/qbman/bman_driver.c...
Checking patch drivers/bus/dpaa/base/qbman/dpaa_sys.c...
Checking patch drivers/bus/dpaa/base/qbman/process.c...
Checking patch drivers/bus/dpaa/dpaa_bus.c...
Checking patch drivers/bus/fslmc/portal/dpaa2_hw_dpio.c...
Checking patch drivers/compress/mlx5/mlx5_compress.c...
Hunk #1 succeeded at 72 (offset -1 lines).
Hunk #2 succeeded at 804 (offset -29 lines).
Hunk #3 succeeded at 826 (offset -29 lines).
Checking patch drivers/event/dlb2/pf/base/dlb2_osdep.h...
Hunk #2 succeeded at 194 (offset 2 lines).
Checking patch drivers/net/af_xdp/rte_eth_af_xdp.c...
Hunk #2 succeeded at 676 (offset 10 lines).
Hunk #3 succeeded at 687 (offset 10 lines).
Hunk #4 succeeded at 725 (offset 10 lines).
Hunk #5 succeeded at 751 (offset 10 lines).
Hunk #6 succeeded at 780 (offset 10 lines).
Hunk #7 succeeded at 948 (offset 10 lines).
Checking patch drivers/net/ark/ark_ethdev.c...
Checking patch drivers/net/atlantic/atl_ethdev.c...
Checking patch drivers/net/atlantic/atl_types.h...
Checking patch drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c...
Checking patch drivers/net/axgbe/axgbe_common.h...
Checking patch drivers/net/axgbe/axgbe_dev.c...
Checking patch drivers/net/axgbe/axgbe_ethdev.c...
Checking patch drivers/net/axgbe/axgbe_ethdev.h...
Checking patch drivers/net/axgbe/axgbe_i2c.c...
Checking patch drivers/net/axgbe/axgbe_mdio.c...
Checking patch drivers/net/axgbe/axgbe_phy_impl.c...
Checking patch drivers/net/bnxt/bnxt.h...
Hunk #1 succeeded at 534 (offset 1 line).
Hunk #2 succeeded at 687 (offset -6 lines).
Hunk #3 succeeded at 741 (offset -6 lines).
Hunk #4 succeeded at 944 (offset -13 lines).
Checking patch drivers/net/bnxt/bnxt_cpr.c...
Checking patch drivers/net/bnxt/bnxt_ethdev.c...
Hunk #6 succeeded at 4108 (offset 32 lines).
Hunk #7 succeeded at 4116 (offset 32 lines).
Hunk #8 succeeded at 4292 (offset 38 lines).
Hunk #9 succeeded at 4307 (offset 38 lines).
Hunk #10 succeeded at 5093 (offset 38 lines).
Hunk #11 succeeded at 5894 (offset 38 lines).
Checking patch drivers/net/bnxt/bnxt_irq.c...
Checking patch drivers/net/bnxt/bnxt_reps.c...
Checking patch drivers/net/bnxt/tf_ulp/bnxt_ulp.c...
Checking patch drivers/net/bnxt/tf_ulp/bnxt_ulp.h...
Checking patch drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c...
Checking patch drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h...
Checking patch drivers/net/ena/base/ena_plat_dpdk.h...
error: while searching for:
#define q_waitqueue_t \
struct { \
pthread_cond_t cond; \
pthread_mutex_t mutex; \
}
#define ena_wait_queue_t q_waitqueue_t
#define ENA_WAIT_EVENT_INIT(waitqueue) \
do { \
pthread_mutex_init(&(waitqueue).mutex, NULL); \
pthread_cond_init(&(waitqueue).cond, NULL); \
} while (0)
error: patch failed: drivers/net/ena/base/ena_plat_dpdk.h:129
error: while searching for:
wait.tv_sec = now.tv_sec + timeout / 1000000UL; \
timeout_us = timeout % 1000000UL; \
wait.tv_nsec = (now.tv_usec + timeout_us) * 1000UL; \
pthread_mutex_lock(&waitevent.mutex); \
pthread_cond_timedwait(&waitevent.cond, \
&waitevent.mutex, &wait); \
pthread_mutex_unlock(&waitevent.mutex); \
} while (0)
#define ENA_WAIT_EVENT_SIGNAL(waitevent) pthread_cond_signal(&waitevent.cond)
/* pthread condition doesn't need to be rearmed after usage */
error: patch failed: drivers/net/ena/base/ena_plat_dpdk.h:149
Checking patch drivers/net/enic/enic.h...
Checking patch drivers/net/ice/ice_dcf_parent.c...
Hunk #2 succeeded at 156 (offset 2 lines).
Checking patch drivers/net/ipn3ke/ipn3ke_representor.c...
Checking patch drivers/net/ixgbe/ixgbe_ethdev.h...
Checking patch drivers/net/kni/rte_eth_kni.c...
Checking patch drivers/net/mlx5/linux/mlx5_os.c...
Hunk #1 succeeded at 2557 (offset 23 lines).
Checking patch drivers/net/mlx5/mlx5.c...
Hunk #2 succeeded at 1088 (offset 107 lines).
Hunk #3 succeeded at 1215 (offset 107 lines).
Hunk #4 succeeded at 1251 (offset 107 lines).
Hunk #5 succeeded at 1282 (offset 107 lines).
Hunk #6 succeeded at 1315 (offset 107 lines).
Hunk #7 succeeded at 2450 (offset 112 lines).
Checking patch drivers/net/mlx5/mlx5.h...
Hunk #1 succeeded at 949 (offset 132 lines).
Checking patch drivers/net/mlx5/mlx5_txpp.c...
Checking patch drivers/net/mlx5/windows/mlx5_flow_os.c...
Checking patch drivers/net/mlx5/windows/mlx5_os.c...
Checking patch drivers/net/qede/base/bcm_osal.h...
Checking patch drivers/net/vhost/rte_eth_vhost.c...
Checking patch drivers/net/virtio/virtio_user/virtio_user_dev.c...
Checking patch drivers/net/virtio/virtio_user/virtio_user_dev.h...
Checking patch drivers/raw/ifpga/ifpga_rawdev.c...
Checking patch drivers/vdpa/ifc/ifcvf_vdpa.c...
Checking patch drivers/vdpa/mlx5/mlx5_vdpa.c...
Hunk #5 succeeded at 736 (offset -28 lines).
Hunk #6 succeeded at 770 (offset -28 lines).
Hunk #7 succeeded at 779 (offset -28 lines).
error: while searching for:
priv->var = NULL;
}
mlx5_glue->close_device(priv->ctx);
pthread_mutex_destroy(&priv->vq_config_lock);
rte_free(priv);
}
return 0;
error: patch failed: drivers/vdpa/mlx5/mlx5_vdpa.c:816
Checking patch drivers/vdpa/mlx5/mlx5_vdpa.h...
error: while searching for:
struct mlx5_vdpa_priv {
TAILQ_ENTRY(mlx5_vdpa_priv) next;
uint8_t configured;
pthread_mutex_t vq_config_lock;
uint64_t last_traffic_tic;
pthread_t timer_tid;
pthread_mutex_t timer_lock;
pthread_cond_t timer_cond;
volatile uint8_t timer_on;
int event_mode;
error: patch failed: drivers/vdpa/mlx5/mlx5_vdpa.h:119
Checking patch drivers/vdpa/mlx5/mlx5_vdpa_event.c...
error: while searching for:
uint32_t max;
uint64_t current_tic;
pthread_mutex_lock(&priv->timer_lock);
while (!priv->timer_on)
pthread_cond_wait(&priv->timer_cond, &priv->timer_lock);
pthread_mutex_unlock(&priv->timer_lock);
priv->timer_delay_us = priv->event_mode ==
MLX5_VDPA_EVENT_MODE_DYNAMIC_TIMER ?
MLX5_VDPA_DEFAULT_TIMER_DELAY_US :
priv->event_us;
while (1) {
max = 0;
pthread_mutex_lock(&priv->vq_config_lock);
for (i = 0; i < priv->nr_virtqs; i++) {
cq = &priv->virtqs[i].eqp.cq;
if (cq->cq_obj.cq && !cq->armed) {
error: patch failed: drivers/vdpa/mlx5/mlx5_vdpa_event.c:247
error: while searching for:
DRV_LOG(DEBUG, "Device %s traffic was stopped.",
priv->vdev->device->name);
mlx5_vdpa_arm_all_cqs(priv);
pthread_mutex_unlock(&priv->vq_config_lock);
pthread_mutex_lock(&priv->timer_lock);
priv->timer_on = 0;
while (!priv->timer_on)
pthread_cond_wait(&priv->timer_cond,
&priv->timer_lock);
pthread_mutex_unlock(&priv->timer_lock);
priv->timer_delay_us = priv->event_mode ==
MLX5_VDPA_EVENT_MODE_DYNAMIC_TIMER ?
MLX5_VDPA_DEFAULT_TIMER_DELAY_US :
error: patch failed: drivers/vdpa/mlx5/mlx5_vdpa_event.c:281
error: while searching for:
} else {
priv->last_traffic_tic = current_tic;
}
pthread_mutex_unlock(&priv->vq_config_lock);
mlx5_vdpa_timer_sleep(priv, max);
}
return NULL;
error: patch failed: drivers/vdpa/mlx5/mlx5_vdpa_event.c:297
error: while searching for:
uint8_t buf[sizeof(struct mlx5dv_devx_async_event_hdr) + 128];
} out;
pthread_mutex_lock(&priv->vq_config_lock);
while (mlx5_glue->devx_get_event(priv->eventc, &out.event_resp,
sizeof(out.buf)) >=
(ssize_t)sizeof(out.event_resp.cookie)) {
error: patch failed: drivers/vdpa/mlx5/mlx5_vdpa_event.c:313
error: while searching for:
eventfd_write(cq->callfd, (eventfd_t)1);
if (priv->event_mode == MLX5_VDPA_EVENT_MODE_ONLY_INTERRUPT) {
mlx5_vdpa_cq_arm(priv, cq);
pthread_mutex_unlock(&priv->vq_config_lock);
return;
}
/* Don't arm again - timer will take control. */
error: patch failed: drivers/vdpa/mlx5/mlx5_vdpa_event.c:332
error: while searching for:
/* Traffic detected: make sure timer is on. */
priv->last_traffic_tic = rte_rdtsc();
pthread_mutex_lock(&priv->timer_lock);
if (!priv->timer_on) {
priv->timer_on = 1;
pthread_cond_signal(&priv->timer_cond);
}
pthread_mutex_unlock(&priv->timer_lock);
pthread_mutex_unlock(&priv->vq_config_lock);
}
static void
error: patch failed: drivers/vdpa/mlx5/mlx5_vdpa_event.c:347
Hunk #7 succeeded at 340 (offset -29 lines).
Hunk #8 succeeded at 386 (offset -29 lines).
error: while searching for:
{
int ret;
rte_cpuset_t cpuset;
pthread_attr_t attr;
char name[16];
const struct sched_param sp = {
.sched_priority = sched_get_priority_max(SCHED_RR),
};
if (!priv->eventc)
/* All virtqs are in poll mode. */
return 0;
if (priv->event_mode != MLX5_VDPA_EVENT_MODE_ONLY_INTERRUPT) {
pthread_mutex_init(&priv->timer_lock, NULL);
pthread_cond_init(&priv->timer_cond, NULL);
priv->timer_on = 0;
pthread_attr_init(&attr);
ret = pthread_attr_setschedpolicy(&attr, SCHED_RR);
if (ret) {
DRV_LOG(ERR, "Failed to set thread sched policy = RR.");
return -1;
}
ret = pthread_attr_setschedparam(&attr, &sp);
if (ret) {
DRV_LOG(ERR, "Failed to set thread priority.");
return -1;
}
ret = pthread_create(&priv->timer_tid, &attr,
mlx5_vdpa_poll_handle, (void *)priv);
if (ret) {
DRV_LOG(ERR, "Failed to create timer thread.");
return -1;
}
CPU_ZERO(&cpuset);
if (priv->event_core != -1)
CPU_SET(priv->event_core, &cpuset);
else
cpuset = rte_lcore_cpuset(rte_get_main_lcore());
ret = pthread_setaffinity_np(priv->timer_tid,
sizeof(cpuset), &cpuset);
if (ret) {
DRV_LOG(ERR, "Failed to set thread affinity.");
goto error;
}
snprintf(name, sizeof(name), "vDPA-mlx5-%d", priv->vid);
ret = pthread_setname_np(priv->timer_tid, name);
if (ret) {
DRV_LOG(ERR, "Failed to set timer thread name.");
return -1;
error: patch failed: drivers/vdpa/mlx5/mlx5_vdpa_event.c:502
error: while searching for:
{
int retries = MLX5_VDPA_INTR_RETRIES;
int ret = -EAGAIN;
void *status;
if (priv->intr_handle.fd) {
while (retries-- && ret == -EAGAIN) {
error: patch failed: drivers/vdpa/mlx5/mlx5_vdpa_event.c:569
error: while searching for:
}
memset(&priv->intr_handle, 0, sizeof(priv->intr_handle));
}
if (priv->timer_tid) {
pthread_cancel(priv->timer_tid);
pthread_join(priv->timer_tid, &status);
}
priv->timer_tid = 0;
}
void
error: patch failed: drivers/vdpa/mlx5/mlx5_vdpa_event.c:585
Checking patch examples/kni/main.c...
Checking patch examples/performance-thread/pthread_shim/main.c...
Checking patch examples/vhost/main.c...
error: while searching for:
unsigned nb_ports, valid_num_ports;
int ret, i;
uint16_t portid;
static pthread_t tid;
uint64_t flags = 0;
signal(SIGINT, sigint_handler);
error: patch failed: examples/vhost/main.c:1635
Checking patch examples/vhost_blk/vhost_blk.c...
Checking patch lib/eal/common/eal_common_options.c...
Hunk #1 succeeded at 1872 (offset 6 lines).
Hunk #2 succeeded at 1900 (offset 6 lines).
Checking patch lib/eal/common/eal_common_proc.c...
Hunk #7 succeeded at 524 (offset -3 lines).
Hunk #8 succeeded at 584 (offset -3 lines).
Hunk #9 succeeded at 998 (offset -1 lines).
Hunk #10 succeeded at 1021 (offset -1 lines).
Hunk #11 succeeded at 1040 (offset -1 lines).
Hunk #12 succeeded at 1118 (offset -1 lines).
Hunk #13 succeeded at 1141 (offset -1 lines).
Hunk #14 succeeded at 1185 (offset -1 lines).
Hunk #15 succeeded at 1201 (offset -1 lines).
Checking patch lib/eal/common/eal_common_thread.c...
Checking patch lib/eal/common/eal_common_trace.c...
Checking patch lib/eal/common/eal_private.h...
Checking patch lib/eal/common/malloc_mp.c...
Hunk #2 succeeded at 301 (offset -2 lines).
Hunk #3 succeeded at 387 (offset -2 lines).
Hunk #4 succeeded at 409 (offset -2 lines).
Hunk #5 succeeded at 539 (offset -2 lines).
Hunk #6 succeeded at 557 (offset -2 lines).
Hunk #7 succeeded at 588 (offset -2 lines).
Hunk #8 succeeded at 603 (offset -2 lines).
Hunk #9 succeeded at 616 (offset -2 lines).
Hunk #10 succeeded at 706 (offset -2 lines).
Hunk #11 succeeded at 767 (offset -2 lines).
Checking patch lib/eal/common/meson.build...
Checking patch lib/eal/freebsd/eal.c...
Checking patch lib/eal/freebsd/eal_alarm.c...
Checking patch lib/eal/freebsd/eal_interrupts.c...
Checking patch lib/eal/freebsd/eal_thread.c...
Checking patch lib/eal/include/meson.build...
Checking patch lib/eal/include/rte_lcore.h...
Checking patch lib/eal/include/rte_per_lcore.h...
Checking patch lib/eal/linux/eal.c...
Checking patch lib/eal/linux/eal_alarm.c...
Checking patch lib/eal/linux/eal_interrupts.c...
Checking patch lib/eal/linux/eal_thread.c...
Checking patch lib/eal/linux/eal_timer.c...
Checking patch lib/eal/unix/meson.build...
Checking patch lib/eal/unix/rte_thread.c...
Checking patch lib/eal/version.map...
Checking patch lib/eal/windows/eal.c...
Checking patch lib/eal/windows/eal_interrupts.c...
Checking patch lib/eal/windows/eal_thread.c...
Checking patch lib/eal/windows/eal_windows.h...
Checking patch lib/eal/windows/include/meson.build...
Checking patch lib/eal/windows/include/pthread.h...
error: while searching for:
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2019 Intel Corporation
*/
#ifndef _PTHREAD_H_
#define _PTHREAD_H_
#include <stdint.h>
#include <sched.h>
/**
* This file is required to support the common code in eal_common_proc.c,
* eal_common_thread.c and common\include\rte_per_lcore.h as Microsoft libc
* does not contain pthread.h. This may be removed in future releases.
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <rte_common.h>
#include <rte_windows.h>
#define PTHREAD_BARRIER_SERIAL_THREAD TRUE
/* defining pthread_t type on Windows since there is no in Microsoft libc*/
typedef uintptr_t pthread_t;
/* defining pthread_attr_t type on Windows since there is no in Microsoft libc*/
typedef void *pthread_attr_t;
typedef void *pthread_mutexattr_t;
typedef CRITICAL_SECTION pthread_mutex_t;
typedef SYNCHRONIZATION_BARRIER pthread_barrier_t;
#define pthread_barrier_init(barrier, attr, count) \
!InitializeSynchronizationBarrier(barrier, count, -1)
#define pthread_barrier_wait(barrier) EnterSynchronizationBarrier(barrier, \
SYNCHRONIZATION_BARRIER_FLAGS_BLOCK_ONLY)
#define pthread_barrier_destroy(barrier) \
!DeleteSynchronizationBarrier(barrier)
#define pthread_cancel(thread) !TerminateThread((HANDLE) thread, 0)
/* pthread function overrides */
#define pthread_self() \
((pthread_t)GetCurrentThreadId())
static inline int
pthread_equal(pthread_t t1, pthread_t t2)
{
return t1 == t2;
}
static inline int
pthread_setaffinity_np(pthread_t threadid, size_t cpuset_size,
rte_cpuset_t *cpuset)
{
DWORD_PTR ret = 0;
HANDLE thread_handle;
if (cpuset == NULL || cpuset_size == 0)
return -1;
thread_handle = OpenThread(THREAD_ALL_ACCESS, FALSE, threadid);
if (thread_handle == NULL) {
RTE_LOG_WIN32_ERR("OpenThread()");
return -1;
}
ret = SetThreadAffinityMask(thread_handle, *cpuset->_bits);
if (ret == 0) {
RTE_LOG_WIN32_ERR("SetThreadAffinityMask()");
goto close_handle;
}
close_handle:
if (CloseHandle(thread_handle) == 0) {
RTE_LOG_WIN32_ERR("CloseHandle()");
return -1;
}
return (ret == 0) ? -1 : 0;
}
static inline int
pthread_getaffinity_np(pthread_t threadid, size_t cpuset_size,
rte_cpuset_t *cpuset)
{
/* Workaround for the lack of a GetThreadAffinityMask()
*API in Windows
*/
DWORD_PTR prev_affinity_mask;
HANDLE thread_handle;
DWORD_PTR ret = 0;
if (cpuset == NULL || cpuset_size == 0)
return -1;
thread_handle = OpenThread(THREAD_ALL_ACCESS, FALSE, threadid);
if (thread_handle == NULL) {
RTE_LOG_WIN32_ERR("OpenThread()");
return -1;
}
/* obtain previous mask by setting dummy mask */
prev_affinity_mask = SetThreadAffinityMask(thread_handle, 0x1);
if (prev_affinity_mask == 0) {
RTE_LOG_WIN32_ERR("SetThreadAffinityMask()");
goto close_handle;
}
/* set it back! */
ret = SetThreadAffinityMask(thread_handle, prev_affinity_mask);
if (ret == 0) {
RTE_LOG_WIN32_ERR("SetThreadAffinityMask()");
goto close_handle;
}
memset(cpuset, 0, cpuset_size);
*cpuset->_bits = prev_affinity_mask;
close_handle:
if (CloseHandle(thread_handle) == 0) {
RTE_LOG_WIN32_ERR("SetThreadAffinityMask()");
return -1;
}
return (ret == 0) ? -1 : 0;
}
static inline int
pthread_create(void *threadid, const void *threadattr, void *threadfunc,
void *args)
{
RTE_SET_USED(threadattr);
HANDLE hThread;
hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)threadfunc,
args, 0, (LPDWORD)threadid);
if (hThread) {
SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
SetThreadPriority(hThread, THREAD_PRIORITY_NORMAL);
}
return ((hThread != NULL) ? 0 : E_FAIL);
}
static inline int
pthread_join(__rte_unused pthread_t thread,
__rte_unused void **value_ptr)
{
return 0;
}
static inline int
pthread_mutex_init(pthread_mutex_t *mutex,
__rte_unused pthread_mutexattr_t *attr)
{
InitializeCriticalSection(mutex);
return 0;
}
static inline int
pthread_mutex_lock(pthread_mutex_t *mutex)
{
EnterCriticalSection(mutex);
return 0;
}
static inline int
pthread_mutex_unlock(pthread_mutex_t *mutex)
{
LeaveCriticalSection(mutex);
retu
error: patch failed: lib/eal/windows/include/pthread.h:1
error: removal patch leaves file contents
error: lib/eal/windows/include/pthread.h: patch does not apply
Checking patch lib/eal/windows/include/sched.h...
Checking patch lib/eal/windows/meson.build...
Checking patch lib/ethdev/rte_ethdev.c...
Hunk #1 succeeded at 526 (offset 2 lines).
Hunk #2 succeeded at 600 (offset 2 lines).
Checking patch lib/ethdev/rte_ethdev_core.h...
Checking patch lib/ethdev/rte_flow.c...
Hunk #1 succeeded at 226 (offset 1 line).
Checking patch lib/eventdev/rte_event_eth_rx_adapter.c...
Hunk #2 succeeded at 1449 (offset -1 lines).
Checking patch lib/vhost/fd_man.c...
Checking patch lib/vhost/fd_man.h...
Checking patch lib/vhost/socket.c...
Hunk #3 succeeded at 74 (offset 1 line).
Hunk #4 succeeded at 87 (offset 1 line).
Hunk #5 succeeded at 271 (offset 2 lines).
Hunk #6 succeeded at 326 (offset 2 lines).
Hunk #7 succeeded at 420 (offset 2 lines).
Hunk #8 succeeded at 456 (offset 2 lines).
Hunk #9 succeeded at 487 (offset 2 lines).
Hunk #10 succeeded at 499 (offset 2 lines).
Hunk #11 succeeded at 510 (offset 2 lines).
Hunk #12 succeeded at 554 (offset 2 lines).
Hunk #13 succeeded at 588 (offset 2 lines).
Hunk #14 succeeded at 602 (offset 2 lines).
Hunk #15 succeeded at 617 (offset 2 lines).
Hunk #16 succeeded at 631 (offset 2 lines).
Hunk #17 succeeded at 641 (offset 2 lines).
Hunk #18 succeeded at 651 (offset 2 lines).
Hunk #19 succeeded at 659 (offset 2 lines).
Hunk #20 succeeded at 674 (offset 2 lines).
Hunk #21 succeeded at 685 (offset 2 lines).
Hunk #22 succeeded at 698 (offset 2 lines).
Hunk #23 succeeded at 724 (offset 2 lines).
Hunk #24 succeeded at 734 (offset 2 lines).
Hunk #25 succeeded at 751 (offset 2 lines).
Hunk #26 succeeded at 779 (offset 2 lines).
Hunk #27 succeeded at 791 (offset 2 lines).
Hunk #28 succeeded at 817 (offset 2 lines).
Hunk #29 succeeded at 849 (offset 2 lines).
Hunk #30 succeeded at 869 (offset 2 lines).
Hunk #31 succeeded at 951 (offset 3 lines).
Hunk #32 succeeded at 965 (offset 3 lines).
Hunk #33 succeeded at 987 (offset 3 lines).
Hunk #34 succeeded at 1001 (offset 3 lines).
Hunk #35 succeeded at 1019 (offset 3 lines).
Hunk #36 succeeded at 1039 (offset 3 lines).
Hunk #37 succeeded at 1054 (offset 3 lines).
Hunk #38 succeeded at 1064 (offset 3 lines).
Hunk #39 succeeded at 1075 (offset 3 lines).
Hunk #40 succeeded at 1100 (offset 3 lines).
Hunk #41 succeeded at 1114 (offset 3 lines).
Hunk #42 succeeded at 1125 (offset 3 lines).
Checking patch lib/vhost/vhost.c...
Hunk #2 succeeded at 657 (offset 1 line).
Hunk #3 succeeded at 666 (offset 1 line).
Hunk #4 succeeded at 674 (offset 1 line).
Checking patch meson_options.txt...
Applied patch app/test/process.h cleanly.
Applied patch app/test/test_lcores.c cleanly.
Applied patch app/test/test_link_bonding.c cleanly.
Applied patch app/test/test_lpm_perf.c cleanly.
Applied patch config/meson.build cleanly.
Applied patch drivers/bus/dpaa/base/qbman/bman_driver.c cleanly.
Applied patch drivers/bus/dpaa/base/qbman/dpaa_sys.c cleanly.
Applied patch drivers/bus/dpaa/base/qbman/process.c cleanly.
Applied patch drivers/bus/dpaa/dpaa_bus.c cleanly.
Applied patch drivers/bus/fslmc/portal/dpaa2_hw_dpio.c cleanly.
Applied patch drivers/compress/mlx5/mlx5_compress.c cleanly.
Applied patch drivers/event/dlb2/pf/base/dlb2_osdep.h cleanly.
Applied patch drivers/net/af_xdp/rte_eth_af_xdp.c cleanly.
Applied patch drivers/net/ark/ark_ethdev.c cleanly.
Applied patch drivers/net/atlantic/atl_ethdev.c cleanly.
Applied patch drivers/net/atlantic/atl_types.h cleanly.
Applied patch drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c cleanly.
Applied patch drivers/net/axgbe/axgbe_common.h cleanly.
Applied patch drivers/net/axgbe/axgbe_dev.c cleanly.
Applied patch drivers/net/axgbe/axgbe_ethdev.c cleanly.
Applied patch drivers/net/axgbe/axgbe_ethdev.h cleanly.
Applied patch drivers/net/axgbe/axgbe_i2c.c cleanly.
Applied patch drivers/net/axgbe/axgbe_mdio.c cleanly.
Applied patch drivers/net/axgbe/axgbe_phy_impl.c cleanly.
Applied patch drivers/net/bnxt/bnxt.h cleanly.
Applied patch drivers/net/bnxt/bnxt_cpr.c cleanly.
Applied patch drivers/net/bnxt/bnxt_ethdev.c cleanly.
Applied patch drivers/net/bnxt/bnxt_irq.c cleanly.
Applied patch drivers/net/bnxt/bnxt_reps.c cleanly.
Applied patch drivers/net/bnxt/tf_ulp/bnxt_ulp.c cleanly.
Applied patch drivers/net/bnxt/tf_ulp/bnxt_ulp.h cleanly.
Applied patch drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c cleanly.
Applied patch drivers/net/bnxt/tf_ulp/ulp_fc_mgr.h cleanly.
Applying patch drivers/net/ena/base/ena_plat_dpdk.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applied patch drivers/net/enic/enic.h cleanly.
Applied patch drivers/net/ice/ice_dcf_parent.c cleanly.
Applied patch drivers/net/ipn3ke/ipn3ke_representor.c cleanly.
Applied patch drivers/net/ixgbe/ixgbe_ethdev.h cleanly.
Applied patch drivers/net/kni/rte_eth_kni.c cleanly.
Applied patch drivers/net/mlx5/linux/mlx5_os.c cleanly.
Applied patch drivers/net/mlx5/mlx5.c cleanly.
Applied patch drivers/net/mlx5/mlx5.h cleanly.
Applied patch drivers/net/mlx5/mlx5_txpp.c cleanly.
Applied patch drivers/net/mlx5/windows/mlx5_flow_os.c cleanly.
Applied patch drivers/net/mlx5/windows/mlx5_os.c cleanly.
Applied patch drivers/net/qede/base/bcm_osal.h cleanly.
Applied patch drivers/net/vhost/rte_eth_vhost.c cleanly.
Applied patch drivers/net/virtio/virtio_user/virtio_user_dev.c cleanly.
Applied patch drivers/net/virtio/virtio_user/virtio_user_dev.h cleanly.
Applied patch drivers/raw/ifpga/ifpga_rawdev.c cleanly.
Applied patch drivers/vdpa/ifc/ifcvf_vdpa.c cleanly.
Applying patch drivers/vdpa/mlx5/mlx5_vdpa.c with 1 reject...
Hunk #1 applied cleanly.
Hunk #2 applied cleanly.
Hunk #3 applied cleanly.
Hunk #4 applied cleanly.
Hunk #5 applied cleanly.
Hunk #6 applied cleanly.
Hunk #7 applied cleanly.
Rejected hunk #8.
Applying patch drivers/vdpa/mlx5/mlx5_vdpa.h with 1 reject...
Rejected hunk #1.
Applying patch drivers/vdpa/mlx5/mlx5_vdpa_event.c with 9 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Hunk #7 applied cleanly.
Hunk #8 applied cleanly.
Rejected hunk #9.
Rejected hunk #10.
Rejected hunk #11.
Applied patch examples/kni/main.c cleanly.
Applied patch examples/performance-thread/pthread_shim/main.c cleanly.
Applying patch examples/vhost/main.c with 1 reject...
Rejected hunk #1.
Applied patch examples/vhost_blk/vhost_blk.c cleanly.
Applied patch lib/eal/common/eal_common_options.c cleanly.
Applied patch lib/eal/common/eal_common_proc.c cleanly.
Applied patch lib/eal/common/eal_common_thread.c cleanly.
Applied patch lib/eal/common/eal_common_trace.c cleanly.
Applied patch lib/eal/common/eal_private.h cleanly.
Applied patch lib/eal/common/malloc_mp.c cleanly.
Applied patch lib/eal/common/meson.build cleanly.
Applied patch lib/eal/freebsd/eal.c cleanly.
Applied patch lib/eal/freebsd/eal_alarm.c cleanly.
Applied patch lib/eal/freebsd/eal_interrupts.c cleanly.
Applied patch lib/eal/freebsd/eal_thread.c cleanly.
Applied patch lib/eal/include/meson.build cleanly.
Applied patch lib/eal/include/rte_lcore.h cleanly.
Applied patch lib/eal/include/rte_per_lcore.h cleanly.
Applied patch lib/eal/linux/eal.c cleanly.
Applied patch lib/eal/linux/eal_alarm.c cleanly.
Applied patch lib/eal/linux/eal_interrupts.c cleanly.
Applied patch lib/eal/linux/eal_thread.c cleanly.
Applied patch lib/eal/linux/eal_timer.c cleanly.
Applied patch lib/eal/unix/meson.build cleanly.
Applied patch lib/eal/unix/rte_thread.c cleanly.
Applied patch lib/eal/version.map cleanly.
Applied patch lib/eal/windows/eal.c cleanly.
Applied patch lib/eal/windows/eal_interrupts.c cleanly.
Applied patch lib/eal/windows/eal_thread.c cleanly.
Applied patch lib/eal/windows/eal_windows.h cleanly.
Applied patch lib/eal/windows/include/meson.build cleanly.
Applied patch lib/eal/windows/include/sched.h cleanly.
Applied patch lib/eal/windows/meson.build cleanly.
Applied patch lib/ethdev/rte_ethdev.c cleanly.
Applied patch lib/ethdev/rte_ethdev_core.h cleanly.
Applied patch lib/ethdev/rte_flow.c cleanly.
Applied patch lib/eventdev/rte_event_eth_rx_adapter.c cleanly.
Applied patch lib/vhost/fd_man.c cleanly.
Applied patch lib/vhost/fd_man.h cleanly.
Applied patch lib/vhost/socket.c cleanly.
Applied patch lib/vhost/vhost.c cleanly.
Applied patch meson_options.txt cleanly.
diff a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h (rejected hunks)
@@ -129,14 +129,14 @@ do { \
#define q_waitqueue_t \
struct { \
pthread_cond_t cond; \
- pthread_mutex_t mutex; \
+ rte_thread_mutex_t mutex; \
}
#define ena_wait_queue_t q_waitqueue_t
#define ENA_WAIT_EVENT_INIT(waitqueue) \
do { \
- pthread_mutex_init(&(waitqueue).mutex, NULL); \
+ rte_thread_mutex_init(&(waitqueue).mutex); \
pthread_cond_init(&(waitqueue).cond, NULL); \
} while (0)
@@ -149,10 +149,10 @@ do { \
wait.tv_sec = now.tv_sec + timeout / 1000000UL; \
timeout_us = timeout % 1000000UL; \
wait.tv_nsec = (now.tv_usec + timeout_us) * 1000UL; \
- pthread_mutex_lock(&waitevent.mutex); \
+ rte_thread_mutex_lock(&waitevent.mutex); \
pthread_cond_timedwait(&waitevent.cond, \
&waitevent.mutex, &wait); \
- pthread_mutex_unlock(&waitevent.mutex); \
+ rte_thread_mutex_unlock(&waitevent.mutex); \
} while (0)
#define ENA_WAIT_EVENT_SIGNAL(waitevent) pthread_cond_signal(&waitevent.cond)
/* pthread condition doesn't need to be rearmed after usage */
diff a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c (rejected hunks)
@@ -816,7 +816,7 @@ mlx5_vdpa_pci_remove(struct rte_pci_device *pci_dev)
priv->var = NULL;
}
mlx5_glue->close_device(priv->ctx);
- pthread_mutex_destroy(&priv->vq_config_lock);
+ rte_thread_mutex_destroy(&priv->vq_config_lock);
rte_free(priv);
}
return 0;
diff a/drivers/vdpa/mlx5/mlx5_vdpa.h b/drivers/vdpa/mlx5/mlx5_vdpa.h (rejected hunks)
@@ -119,10 +119,10 @@ enum {
struct mlx5_vdpa_priv {
TAILQ_ENTRY(mlx5_vdpa_priv) next;
uint8_t configured;
- pthread_mutex_t vq_config_lock;
+ rte_thread_mutex_t vq_config_lock;
uint64_t last_traffic_tic;
- pthread_t timer_tid;
- pthread_mutex_t timer_lock;
+ rte_thread_t timer_tid;
+ rte_thread_mutex_t timer_lock;
pthread_cond_t timer_cond;
volatile uint8_t timer_on;
int event_mode;
diff a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c (rejected hunks)
@@ -247,17 +247,17 @@ mlx5_vdpa_poll_handle(void *arg)
uint32_t max;
uint64_t current_tic;
- pthread_mutex_lock(&priv->timer_lock);
+ rte_thread_mutex_lock(&priv->timer_lock);
while (!priv->timer_on)
pthread_cond_wait(&priv->timer_cond, &priv->timer_lock);
- pthread_mutex_unlock(&priv->timer_lock);
+ rte_thread_mutex_unlock(&priv->timer_lock);
priv->timer_delay_us = priv->event_mode ==
MLX5_VDPA_EVENT_MODE_DYNAMIC_TIMER ?
MLX5_VDPA_DEFAULT_TIMER_DELAY_US :
priv->event_us;
while (1) {
max = 0;
- pthread_mutex_lock(&priv->vq_config_lock);
+ rte_thread_mutex_lock(&priv->vq_config_lock);
for (i = 0; i < priv->nr_virtqs; i++) {
cq = &priv->virtqs[i].eqp.cq;
if (cq->cq_obj.cq && !cq->armed) {
@@ -281,13 +281,13 @@ mlx5_vdpa_poll_handle(void *arg)
DRV_LOG(DEBUG, "Device %s traffic was stopped.",
priv->vdev->device->name);
mlx5_vdpa_arm_all_cqs(priv);
- pthread_mutex_unlock(&priv->vq_config_lock);
- pthread_mutex_lock(&priv->timer_lock);
+ rte_thread_mutex_unlock(&priv->vq_config_lock);
+ rte_thread_mutex_lock(&priv->timer_lock);
priv->timer_on = 0;
while (!priv->timer_on)
pthread_cond_wait(&priv->timer_cond,
&priv->timer_lock);
- pthread_mutex_unlock(&priv->timer_lock);
+ rte_thread_mutex_unlock(&priv->timer_lock);
priv->timer_delay_us = priv->event_mode ==
MLX5_VDPA_EVENT_MODE_DYNAMIC_TIMER ?
MLX5_VDPA_DEFAULT_TIMER_DELAY_US :
@@ -297,7 +297,7 @@ mlx5_vdpa_poll_handle(void *arg)
} else {
priv->last_traffic_tic = current_tic;
}
- pthread_mutex_unlock(&priv->vq_config_lock);
+ rte_thread_mutex_unlock(&priv->vq_config_lock);
mlx5_vdpa_timer_sleep(priv, max);
}
return NULL;
@@ -313,7 +313,7 @@ mlx5_vdpa_interrupt_handler(void *cb_arg)
uint8_t buf[sizeof(struct mlx5dv_devx_async_event_hdr) + 128];
} out;
- pthread_mutex_lock(&priv->vq_config_lock);
+ rte_thread_mutex_lock(&priv->vq_config_lock);
while (mlx5_glue->devx_get_event(priv->eventc, &out.event_resp,
sizeof(out.buf)) >=
(ssize_t)sizeof(out.event_resp.cookie)) {
@@ -332,7 +332,7 @@ mlx5_vdpa_interrupt_handler(void *cb_arg)
eventfd_write(cq->callfd, (eventfd_t)1);
if (priv->event_mode == MLX5_VDPA_EVENT_MODE_ONLY_INTERRUPT) {
mlx5_vdpa_cq_arm(priv, cq);
- pthread_mutex_unlock(&priv->vq_config_lock);
+ rte_thread_mutex_unlock(&priv->vq_config_lock);
return;
}
/* Don't arm again - timer will take control. */
@@ -347,13 +347,13 @@ mlx5_vdpa_interrupt_handler(void *cb_arg)
/* Traffic detected: make sure timer is on. */
priv->last_traffic_tic = rte_rdtsc();
- pthread_mutex_lock(&priv->timer_lock);
+ rte_thread_mutex_lock(&priv->timer_lock);
if (!priv->timer_on) {
priv->timer_on = 1;
pthread_cond_signal(&priv->timer_cond);
}
- pthread_mutex_unlock(&priv->timer_lock);
- pthread_mutex_unlock(&priv->vq_config_lock);
+ rte_thread_mutex_unlock(&priv->timer_lock);
+ rte_thread_mutex_unlock(&priv->vq_config_lock);
}
static void
@@ -502,49 +502,41 @@ mlx5_vdpa_cqe_event_setup(struct mlx5_vdpa_priv *priv)
{
int ret;
rte_cpuset_t cpuset;
- pthread_attr_t attr;
+ rte_thread_attr_t attr;
char name[16];
- const struct sched_param sp = {
- .sched_priority = sched_get_priority_max(SCHED_RR),
- };
if (!priv->eventc)
/* All virtqs are in poll mode. */
return 0;
if (priv->event_mode != MLX5_VDPA_EVENT_MODE_ONLY_INTERRUPT) {
- pthread_mutex_init(&priv->timer_lock, NULL);
+ rte_thread_mutex_init(&priv->timer_lock);
pthread_cond_init(&priv->timer_cond, NULL);
priv->timer_on = 0;
- pthread_attr_init(&attr);
- ret = pthread_attr_setschedpolicy(&attr, SCHED_RR);
+ rte_thread_attr_init(&attr);
+ CPU_ZERO(&cpuset);
+ if (priv->event_core != -1)
+ CPU_SET(priv->event_core, &cpuset);
+ else
+ cpuset = rte_lcore_cpuset(rte_get_main_lcore());
+ ret = rte_thread_attr_set_affinity(&attr, &cpuset);
if (ret) {
- DRV_LOG(ERR, "Failed to set thread sched policy = RR.");
+ DRV_LOG(ERR, "Failed to set thread affinity.");
return -1;
}
- ret = pthread_attr_setschedparam(&attr, &sp);
+ ret = rte_thread_attr_set_priority(&attr,
+ RTE_THREAD_PRIORITY_REALTIME_CRITICAL);
if (ret) {
DRV_LOG(ERR, "Failed to set thread priority.");
return -1;
}
- ret = pthread_create(&priv->timer_tid, &attr,
+ ret = rte_thread_create(&priv->timer_tid, &attr,
mlx5_vdpa_poll_handle, (void *)priv);
if (ret) {
DRV_LOG(ERR, "Failed to create timer thread.");
return -1;
}
- CPU_ZERO(&cpuset);
- if (priv->event_core != -1)
- CPU_SET(priv->event_core, &cpuset);
- else
- cpuset = rte_lcore_cpuset(rte_get_main_lcore());
- ret = pthread_setaffinity_np(priv->timer_tid,
- sizeof(cpuset), &cpuset);
- if (ret) {
- DRV_LOG(ERR, "Failed to set thread affinity.");
- goto error;
- }
snprintf(name, sizeof(name), "vDPA-mlx5-%d", priv->vid);
- ret = pthread_setname_np(priv->timer_tid, name);
+ ret = pthread_setname_np(priv->timer_tid.opaque_id, name);
if (ret) {
DRV_LOG(ERR, "Failed to set timer thread name.");
return -1;
@@ -569,7 +561,6 @@ mlx5_vdpa_cqe_event_unset(struct mlx5_vdpa_priv *priv)
{
int retries = MLX5_VDPA_INTR_RETRIES;
int ret = -EAGAIN;
- void *status;
if (priv->intr_handle.fd) {
while (retries-- && ret == -EAGAIN) {
@@ -585,11 +576,11 @@ mlx5_vdpa_cqe_event_unset(struct mlx5_vdpa_priv *priv)
}
memset(&priv->intr_handle, 0, sizeof(priv->intr_handle));
}
- if (priv->timer_tid) {
- pthread_cancel(priv->timer_tid);
- pthread_join(priv->timer_tid, &status);
+ if (priv->timer_tid.opaque_id) {
+ rte_thread_cancel(priv->timer_tid);
+ rte_thread_join(priv->timer_tid, NULL);
}
- priv->timer_tid = 0;
+ priv->timer_tid.opaque_id = 0;
}
void
diff a/examples/vhost/main.c b/examples/vhost/main.c (rejected hunks)
@@ -1635,7 +1635,7 @@ main(int argc, char *argv[])
unsigned nb_ports, valid_num_ports;
int ret, i;
uint16_t portid;
- static pthread_t tid;
+ static rte_thread_t tid;
uint64_t flags = 0;
signal(SIGINT, sigint_handler);
https://lab.dpdk.org/results/dashboard/patchsets/17280/
UNH-IOL DPDK Community Lab
More information about the test-report
mailing list