patch-2.2.4 linux/include/net/dst.h
Next file: linux/include/net/ip.h
Previous file: linux/include/net/addrconf.h
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Tue Mar 23 13:55:09 1999
- Orig file:
v2.2.3/linux/include/net/dst.h
- Orig date:
Sat Sep 5 16:46:41 1998
diff -u --recursive --new-file v2.2.3/linux/include/net/dst.h linux/include/net/dst.h
@@ -36,9 +36,10 @@
struct device *dev;
int obsolete;
unsigned long lastuse;
+ unsigned long expires;
unsigned mxlock;
- unsigned window;
unsigned pmtu;
+ unsigned window;
unsigned rtt;
unsigned long rate_last; /* rate limiting for ICMP */
unsigned long rate_tokens;
@@ -98,6 +99,19 @@
atomic_dec(&dst->use);
}
+/* The following primitive should be use if and only if
+ destination entry has just been removed from a location
+ accessed directly by hard irq.
+ */
+extern __inline__
+void dst_release_irqwait(struct dst_entry * dst)
+{
+ if (dst) {
+ synchronize_irq();
+ atomic_dec(&dst->use);
+ }
+}
+
extern __inline__
struct dst_entry * dst_check(struct dst_entry ** dst_p, u32 cookie)
{
@@ -151,6 +165,17 @@
struct dst_entry * dst = skb->dst;
if (dst && dst->ops && dst->ops->link_failure)
dst->ops->link_failure(skb);
+}
+
+extern __inline__ void dst_set_expires(struct dst_entry *dst, int timeout)
+{
+ unsigned long expires = jiffies + timeout;
+
+ if (expires == 0)
+ expires = 1;
+
+ if (dst->expires == 0 || (long)(dst->expires - expires) > 0)
+ dst->expires = expires;
}
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)