[dpdk-test-report] |WARNING| pw97045-97051 [PATCH] [v3, 6/6] Allow choice between internal EAL thread API and external lib

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Wed Aug 18 17:25:53 CEST 2021


Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/97045

_apply patch failure_

Submitter: Narcisa Ana Maria Vasile <navasile at linux.microsoft.com>
Date: Wednesday, August 18 2021 13:44:07 
Applied on: CommitID:fdab8f2e17493192d555cd88cf28b06269174326
Apply patch set 97045-97051 failed:

Checking patch lib/eal/common/rte_thread.c...
error: lib/eal/common/rte_thread.c: does not exist in index
Checking patch lib/eal/include/rte_thread.h...
error: while searching for:
__rte_experimental
int rte_thread_barrier_destroy(rte_thread_barrier *barrier);

/**
 * Create a TLS data key visible to all threads in the process.
 * the created key is later used to get/set a value.

error: patch failed: lib/eal/include/rte_thread.h:439
Checking patch lib/eal/version.map...
error: while searching for:
	rte_thread_barrier_init;
	rte_thread_barrier_wait;
	rte_thread_barrier_destroy;
};

INTERNAL {

error: patch failed: lib/eal/version.map:446
Checking patch lib/eal/windows/rte_thread.c...
error: while searching for:
	return 0;
}

int
rte_thread_key_create(rte_thread_key *key,
		__rte_unused void (*destructor)(void *))

error: patch failed: lib/eal/windows/rte_thread.c:556
Applying patch lib/eal/include/rte_thread.h with 1 reject...
Rejected hunk #1.
Applying patch lib/eal/version.map with 1 reject...
Rejected hunk #1.
Applying patch lib/eal/windows/rte_thread.c with 1 reject...
Rejected hunk #1.
diff a/lib/eal/include/rte_thread.h b/lib/eal/include/rte_thread.h	(rejected hunks)
@@ -439,6 +439,22 @@ int rte_thread_barrier_wait(rte_thread_barrier *barrier);
 __rte_experimental
 int rte_thread_barrier_destroy(rte_thread_barrier *barrier);
 
+/**
+ * Set the name of the thread represented by 'thread_id'.
+ *
+ * @param thread_id
+ *   The id of the thread.
+ *
+ * @param name
+ *   Thread name to set.
+ *
+ * @return
+ *   On success, return 0.
+ *   On failure, return a positive errno-style error number.
+ */
+__rte_experimental
+int rte_thread_name_set(rte_thread_t thread_id, const char *name);
+
 /**
  * Create a TLS data key visible to all threads in the process.
  * the created key is later used to get/set a value.
diff a/lib/eal/version.map b/lib/eal/version.map	(rejected hunks)
@@ -446,6 +446,7 @@ EXPERIMENTAL {
 	rte_thread_barrier_init;
 	rte_thread_barrier_wait;
 	rte_thread_barrier_destroy;
+	rte_thread_name_set;
 };
 
 INTERNAL {
diff a/lib/eal/windows/rte_thread.c b/lib/eal/windows/rte_thread.c	(rejected hunks)
@@ -556,6 +556,74 @@ rte_thread_barrier_destroy(rte_thread_barrier *barrier)
 	return 0;
 }
 
+typedef HRESULT
+(*SetThreadDescription_type)(HANDLE thread_handle, PCWSTR thread_description);
+
+static SetThreadDescription_type SetThreadDescription_ptr;
+
+RTE_INIT(rte_thread_description_ptr_init)
+{
+	HMODULE kernel_lib = NULL;
+	static const char library_name[] = "kernel32.dll";
+	static const char function[] = "SetThreadDescription";
+
+	kernel_lib = LoadLibraryA(library_name);
+	if (kernel_lib == NULL) {
+		(void)thread_log_last_error("LoadLibraryA(\"kernel32.dll\")");
+		return;
+	}
+
+	SetThreadDescription_ptr = (SetThreadDescription_type)(
+			(void *)GetProcAddress(kernel_lib, function));
+	if (SetThreadDescription_ptr == NULL) {
+		(void)thread_log_last_error("GetProcAddress(\"kernel32.dll\", \"SetThreadDescription\")");
+		return;
+	}
+
+	FreeLibrary(kernel_lib);
+}
+
+int
+rte_thread_name_set(rte_thread_t thread_id, const char *name)
+{
+	int ret = 0;
+	size_t count;
+	HRESULT hr;
+	HANDLE thread_handle = NULL;
+	WCHAR w_name[16];
+
+	thread_handle = OpenThread(THREAD_SET_LIMITED_INFORMATION, FALSE,
+			thread_id.opaque_id);
+	if (thread_handle == NULL) {
+		ret = thread_log_last_error("OpenThread()");
+		goto cleanup;
+	}
+
+	count = mbstowcs(w_name, name, RTE_DIM(w_name));
+	if (count == (size_t) (-1)) {
+		RTE_LOG(DEBUG, EAL, "Invalid thread name!\n");
+		ret = EINVAL;
+		goto cleanup;
+	}
+
+	if (SetThreadDescription_ptr == NULL) {
+		RTE_LOG(DEBUG, EAL, "Invalid function pointer to SetThreadDescription()!\n");
+		ret = EINVAL;
+		goto cleanup;
+	}
+
+	hr = SetThreadDescription_ptr(thread_handle, w_name);
+	if (FAILED(hr)) {
+		ret = thread_log_last_error("SetThreadDescription()");
+		goto cleanup;
+	}
+
+cleanup:
+	if (thread_handle != NULL)
+		CloseHandle(thread_handle);
+	return ret;
+}
+
 int
 rte_thread_key_create(rte_thread_key *key,
 		__rte_unused void (*destructor)(void *))
Checking patch lib/eal/common/eal_common_thread.c...
Checking patch lib/eal/include/rte_thread.h...
error: while searching for:
__rte_experimental
int rte_thread_name_set(rte_thread_t thread_id, const char *name);

/**
 * Create a TLS data key visible to all threads in the process.
 * the created key is later used to get/set a value.

error: patch failed: lib/eal/include/rte_thread.h:455
Checking patch lib/eal/version.map...
error: while searching for:
	rte_thread_barrier_wait;
	rte_thread_barrier_destroy;
	rte_thread_name_set;
};

INTERNAL {

error: patch failed: lib/eal/version.map:447
Applied patch lib/eal/common/eal_common_thread.c cleanly.
Applying patch lib/eal/include/rte_thread.h with 1 reject...
Rejected hunk #1.
Applying patch lib/eal/version.map with 1 reject...
Rejected hunk #1.
diff a/lib/eal/include/rte_thread.h b/lib/eal/include/rte_thread.h	(rejected hunks)
@@ -455,6 +455,33 @@ int rte_thread_barrier_destroy(rte_thread_barrier *barrier);
 __rte_experimental
 int rte_thread_name_set(rte_thread_t thread_id, const char *name);
 
+/**
+ * Create a control thread.
+ *
+ * Set affinity and thread name. The affinity of the new thread is based
+ * on the CPU affinity retrieved at the time rte_eal_init() was called,
+ * the dataplane and service lcores are then excluded.
+ *
+ * @param thread
+ *   Filled with the thread id of the new created thread.
+ *
+ * @param name
+ *   The name of the control thread (max 16 characters including '\0').
+ *
+ * @param start_routine
+ *   Function to be executed by the new thread.
+ *
+ * @param arg
+ *   Argument passed to start_routine.
+ *
+ * @return
+ *   On success, return 0;
+ *   On failure, return a positive errno-style error number.
+ */
+__rte_experimental
+int rte_thread_ctrl_thread_create(rte_thread_t *thread, const char *name,
+		rte_thread_func start_routine, void *arg);
+
 /**
  * Create a TLS data key visible to all threads in the process.
  * the created key is later used to get/set a value.
diff a/lib/eal/version.map b/lib/eal/version.map	(rejected hunks)
@@ -447,6 +447,7 @@ EXPERIMENTAL {
 	rte_thread_barrier_wait;
 	rte_thread_barrier_destroy;
 	rte_thread_name_set;
+	rte_thread_ctrl_thread_create;
 };
 
 INTERNAL {
Checking patch lib/eal/common/eal_common_options.c...
Hunk #1 succeeded at 1847 (offset -25 lines).
Hunk #2 succeeded at 1875 (offset -25 lines).
Checking patch lib/eal/common/eal_common_thread.c...
error: lib/eal/common/eal_common_thread.c: does not match index
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...
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/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/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/rte_windows.h...
Checking patch lib/ethdev/rte_ethdev.c...
Checking patch lib/ethdev/rte_ethdev_core.h...
Checking patch lib/ethdev/rte_flow.c...
Checking patch lib/eventdev/rte_event_eth_rx_adapter.c...
Checking patch lib/vhost/vhost.c...
Applied patch lib/eal/common/eal_common_options.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/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/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/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/rte_windows.h 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/vhost.c cleanly.
Checking patch lib/eal/common/eal_common_thread.c...
error: lib/eal/common/eal_common_thread.c: does not match index
Checking patch lib/eal/common/eal_thread.h...
Checking patch lib/eal/freebsd/eal.c...
error: lib/eal/freebsd/eal.c: does not match index
Checking patch lib/eal/linux/eal.c...
error: lib/eal/linux/eal.c: does not match index
Checking patch lib/eal/windows/eal.c...
error: lib/eal/windows/eal.c: does not match index
Applied patch lib/eal/common/eal_thread.h cleanly.

https://lab.dpdk.org/results/dashboard/patchsets/18245/

UNH-IOL DPDK Community Lab


More information about the test-report mailing list