summaryrefslogtreecommitdiffstats
path: root/sys/net/flowtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/flowtable.c')
-rw-r--r--sys/net/flowtable.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/net/flowtable.c b/sys/net/flowtable.c
index b85ae26..31c2acc 100644
--- a/sys/net/flowtable.c
+++ b/sys/net/flowtable.c
@@ -930,16 +930,20 @@ flowtable_route_flush(struct flowtable *ft, struct rtentry *rt)
for (i = 0; i <= mp_maxid; i++) {
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, rt);
- 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, rt);
OpenPOWER on IntegriCloud