patch-2.3.43 linux/net/ipv4/route.c
Next file: linux/net/ipv4/tcp.c
Previous file: linux/net/ipv4/ip_output.c
Back to the patch index
Back to the overall index
- Lines: 76
- Date:
Wed Feb 9 20:08:09 2000
- Orig file:
v2.3.42/linux/net/ipv4/route.c
- Orig date:
Fri Jan 28 15:09:09 2000
diff -u --recursive --new-file v2.3.42/linux/net/ipv4/route.c linux/net/ipv4/route.c
@@ -5,7 +5,7 @@
*
* ROUTE - implementation of the IP router.
*
- * Version: $Id: route.c,v 1.80 2000/01/21 06:37:27 davem Exp $
+ * Version: $Id: route.c,v 1.81 2000/02/09 11:16:42 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -313,7 +313,7 @@
}
/* This runs via a timer and thus is always in BH context. */
-static void rt_check_expire(unsigned long dummy)
+static void SMP_TIMER_NAME(rt_check_expire)(unsigned long dummy)
{
int i, t;
static int rover;
@@ -359,10 +359,12 @@
mod_timer(&rt_periodic_timer, now + ip_rt_gc_interval);
}
+SMP_TIMER_DEFINE(rt_check_expire, rt_gc_task);
+
/* This can run from both BH and non-BH contexts, the latter
* in the case of a forced flush event.
*/
-static void rt_run_flush(unsigned long dummy)
+static void SMP_TIMER_NAME(rt_run_flush)(unsigned long dummy)
{
int i;
struct rtable * rth, * next;
@@ -382,13 +384,15 @@
}
}
}
+
+SMP_TIMER_DEFINE(rt_run_flush, rt_cache_flush_task);
static spinlock_t rt_flush_lock = SPIN_LOCK_UNLOCKED;
void rt_cache_flush(int delay)
{
unsigned long now = jiffies;
- int user_mode = !in_interrupt();
+ int user_mode = !in_softirq();
if (delay < 0)
delay = ip_rt_min_delay;
@@ -414,7 +418,7 @@
if (delay <= 0) {
spin_unlock_bh(&rt_flush_lock);
- rt_run_flush(0);
+ SMP_TIMER_NAME(rt_run_flush)(0);
return;
}
@@ -529,7 +533,7 @@
if (atomic_read(&ipv4_dst_ops.entries) < ip_rt_max_size)
return 0;
- } while (!in_interrupt() && jiffies - now < 1);
+ } while (!in_softirq() && jiffies - now < 1);
if (atomic_read(&ipv4_dst_ops.entries) < ip_rt_max_size)
return 0;
@@ -552,7 +556,7 @@
{
struct rtable *rth, **rthp;
unsigned long now = jiffies;
- int attempts = !in_interrupt();
+ int attempts = !in_softirq();
restart:
rthp = &rt_hash_table[hash].chain;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)