Commit d6e54a41 authored by Krishna T's avatar Krishna T Committed by Fabio Baltieri
Browse files

net: zperf: Make Zperf worker thread priority configurable

This helps us test impact of scheduling on traffic.

Signed-off-by: default avatarKrishna T <krishna.t@nordicsemi.no>
parent 5720f1ea
Loading
Loading
Loading
Loading
+6 −0
Changes for subsys/net/lib/zperf/Kconfig: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -11,6 +11,12 @@ menuconfig NET_ZPERF

if NET_ZPERF

config ZPERF_WORK_Q_THREAD_PRIORITY
	int "zperf work queue thread priority"
	default NUM_PREEMPT_PRIORITIES
	help
	  Priority of the thread that handles zperf work queue.

module = NET_ZPERF
module-dep = NET_LOG
module-str = Log level for zperf
+1 −2
Changes for subsys/net/lib/zperf/zperf_common.c: 1 added line, 2 removed lines.
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@

LOG_MODULE_REGISTER(net_zperf, CONFIG_NET_ZPERF_LOG_LEVEL);

#define ZPERF_WORK_Q_THREAD_PRIORITY K_LOWEST_APPLICATION_THREAD_PRIO
#define ZPERF_WORK_Q_STACK_SIZE 2048
/* Get some useful debug routings from net_private.h, requires
 * that NET_LOG_ENABLED is set.
@@ -219,7 +218,7 @@ static int zperf_init(const struct device *unused)
	k_work_queue_init(&zperf_work_q);
	k_work_queue_start(&zperf_work_q, zperf_work_q_stack,
			   K_THREAD_STACK_SIZEOF(zperf_work_q_stack),
			   ZPERF_WORK_Q_THREAD_PRIORITY, NULL);
			   CONFIG_ZPERF_WORK_Q_THREAD_PRIORITY, NULL);
	k_thread_name_set(&zperf_work_q.thread, "zperf_work_q");

	zperf_udp_uploader_init();