Skip to content

Commit 9bf5718

Browse files
Tomasz Bursztykacfriedt
authored andcommitted
net/tcp: Use highest priority for TCP internal work queue
Reason why the prority was at its lowest is unknown, but now that it may be used to send local packets (which used to be sent right away), it seems to affect TCP scheduling in loopback mode. Raising the prority so it matches how it was previously (i.e. sent right away) should fix things. (Note however that this issue was not broadly present, only sockets.tls test seemed to be affected.) Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent 4eec9d9 commit 9bf5718

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

subsys/net/ip/tcp2.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2828,10 +2828,9 @@ void net_tcp_init(void)
28282828
#endif
28292829

28302830
#if IS_ENABLED(CONFIG_NET_TC_THREAD_COOPERATIVE)
2831-
/* Lowest priority cooperative thread */
2832-
#define THREAD_PRIORITY K_PRIO_COOP(CONFIG_NUM_COOP_PRIORITIES - 1)
2831+
#define THREAD_PRIORITY K_PRIO_COOP(0)
28332832
#else
2834-
#define THREAD_PRIORITY K_PRIO_PREEMPT(CONFIG_NUM_PREEMPT_PRIORITIES - 1)
2833+
#define THREAD_PRIORITY K_PRIO_PREEMPT(0)
28352834
#endif
28362835

28372836
/* Use private workqueue in order not to block the system work queue.

0 commit comments

Comments
 (0)