|
@@ -778,6 +778,9 @@ static void neigh_periodic_work(struct work_struct *work)
|
|
|
nht = rcu_dereference_protected(tbl->nht,
|
|
|
lockdep_is_held(&tbl->lock));
|
|
|
|
|
|
+ if (atomic_read(&tbl->entries) < tbl->gc_thresh1)
|
|
|
+ goto out;
|
|
|
+
|
|
|
/*
|
|
|
* periodically recompute ReachableTime from random function
|
|
|
*/
|
|
@@ -832,6 +835,7 @@ next_elt:
|
|
|
nht = rcu_dereference_protected(tbl->nht,
|
|
|
lockdep_is_held(&tbl->lock));
|
|
|
}
|
|
|
+out:
|
|
|
/* Cycle through all hash buckets every base_reachable_time/2 ticks.
|
|
|
* ARP entry timeouts range from 1/2 base_reachable_time to 3/2
|
|
|
* base_reachable_time.
|