From cbbce42345c51536d7dc63643f47a3cbf87d647e Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Sat, 7 May 2022 17:15:34 +0200 Subject: [PATCH] epair: unbind prior to returning to userspace If 'options RSS' is set we bind the epair tasks to different CPUs. We must take care to not keep the current thread bound to the last CPU when we return to userspace. MFC after: 1 week Sponsored by: Orange Business Services --- sys/net/if_epair.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index e9b056ef2bd..21e50b5171a 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -826,6 +826,9 @@ epair_mod_init(void) epair_tasks.tasks++; } + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); #else snprintf(name, sizeof(name), "epair_task");