diff options
Diffstat (limited to 'include/net/dst.h')
-rw-r--r-- | include/net/dst.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 75b95df4afe7..e12ddfb9eb16 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -16,13 +16,6 @@ | |||
16 | #include <net/neighbour.h> | 16 | #include <net/neighbour.h> |
17 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
18 | 18 | ||
19 | /* | ||
20 | * 0 - no debugging messages | ||
21 | * 1 - rare events and bugs (default) | ||
22 | * 2 - trace mode. | ||
23 | */ | ||
24 | #define RT_CACHE_DEBUG 0 | ||
25 | |||
26 | #define DST_GC_MIN (HZ/10) | 19 | #define DST_GC_MIN (HZ/10) |
27 | #define DST_GC_INC (HZ/2) | 20 | #define DST_GC_INC (HZ/2) |
28 | #define DST_GC_MAX (120*HZ) | 21 | #define DST_GC_MAX (120*HZ) |
@@ -84,6 +77,7 @@ struct dst_entry { | |||
84 | #define DST_NOPOLICY 0x0004 | 77 | #define DST_NOPOLICY 0x0004 |
85 | #define DST_NOHASH 0x0008 | 78 | #define DST_NOHASH 0x0008 |
86 | #define DST_NOCACHE 0x0010 | 79 | #define DST_NOCACHE 0x0010 |
80 | #define DST_NOCOUNT 0x0020 | ||
87 | union { | 81 | union { |
88 | struct dst_entry *next; | 82 | struct dst_entry *next; |
89 | struct rtable __rcu *rt_next; | 83 | struct rtable __rcu *rt_next; |
@@ -92,8 +86,6 @@ struct dst_entry { | |||
92 | }; | 86 | }; |
93 | }; | 87 | }; |
94 | 88 | ||
95 | #ifdef __KERNEL__ | ||
96 | |||
97 | extern u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old); | 89 | extern u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old); |
98 | extern const u32 dst_default_metrics[RTAX_MAX]; | 90 | extern const u32 dst_default_metrics[RTAX_MAX]; |
99 | 91 | ||
@@ -120,6 +112,8 @@ static inline u32 *dst_metrics_write_ptr(struct dst_entry *dst) | |||
120 | { | 112 | { |
121 | unsigned long p = dst->_metrics; | 113 | unsigned long p = dst->_metrics; |
122 | 114 | ||
115 | BUG_ON(!p); | ||
116 | |||
123 | if (p & DST_METRICS_READ_ONLY) | 117 | if (p & DST_METRICS_READ_ONLY) |
124 | return dst->ops->cow_metrics(dst, p); | 118 | return dst->ops->cow_metrics(dst, p); |
125 | return __DST_METRICS_PTR(p); | 119 | return __DST_METRICS_PTR(p); |
@@ -352,7 +346,8 @@ static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) | |||
352 | } | 346 | } |
353 | 347 | ||
354 | extern int dst_discard(struct sk_buff *skb); | 348 | extern int dst_discard(struct sk_buff *skb); |
355 | extern void *dst_alloc(struct dst_ops * ops, int initial_ref); | 349 | extern void *dst_alloc(struct dst_ops * ops, struct net_device *dev, |
350 | int initial_ref, int initial_obsolete, int flags); | ||
356 | extern void __dst_free(struct dst_entry * dst); | 351 | extern void __dst_free(struct dst_entry * dst); |
357 | extern struct dst_entry *dst_destroy(struct dst_entry * dst); | 352 | extern struct dst_entry *dst_destroy(struct dst_entry * dst); |
358 | 353 | ||
@@ -438,6 +433,5 @@ extern struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig | |||
438 | const struct flowi *fl, struct sock *sk, | 433 | const struct flowi *fl, struct sock *sk, |
439 | int flags); | 434 | int flags); |
440 | #endif | 435 | #endif |
441 | #endif | ||
442 | 436 | ||
443 | #endif /* _NET_DST_H */ | 437 | #endif /* _NET_DST_H */ |