summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/net/flowtable.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/net/flowtable.c b/sys/net/flowtable.c
index 31c2acc..3ed0528 100644
--- a/sys/net/flowtable.c
+++ b/sys/net/flowtable.c
@@ -963,15 +963,19 @@ flowtable_clean_vnet(void)
if (CPU_ABSENT(i))
continue;
- thread_lock(curthread);
- sched_bind(curthread, i);
- thread_unlock(curthread);
+ if (smp_started == 1) {
+ thread_lock(curthread);
+ sched_bind(curthread, i);
+ thread_unlock(curthread);
+ }
flowtable_free_stale(ft, NULL);
- thread_lock(curthread);
- sched_unbind(curthread);
- thread_unlock(curthread);
+ if (smp_started == 1) {
+ thread_lock(curthread);
+ sched_unbind(curthread);
+ thread_unlock(curthread);
+ }
}
} else {
flowtable_free_stale(ft, NULL);
OpenPOWER on IntegriCloud