ipv6: reduce per device ICMP mib sizes
[firefly-linux-kernel-4.4.55.git] / include / net / dst.h
index 2a46cbaef92d30dd7c890deb34a9554634eb94b5..07a0402c52e6b3cec976652d7aa0c3d4a101d955 100644 (file)
 #include <net/neighbour.h>
 #include <asm/processor.h>
 
-/*
- * 0 - no debugging messages
- * 1 - rare events and bugs (default)
- * 2 - trace mode.
- */
-#define RT_CACHE_DEBUG         0
-
 #define DST_GC_MIN     (HZ/10)
 #define DST_GC_INC     (HZ/2)
 #define DST_GC_MAX     (120*HZ)
@@ -92,8 +85,6 @@ struct dst_entry {
        };
 };
 
-#ifdef __KERNEL__
-
 extern u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old);
 extern const u32 dst_default_metrics[RTAX_MAX];
 
@@ -345,14 +336,15 @@ static inline void skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev)
 
 static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb)
 {
-       struct dst_entry *child = skb_dst(skb)->child;
+       struct dst_entry *child = dst_clone(skb_dst(skb)->child);
 
        skb_dst_drop(skb);
        return child;
 }
 
 extern int dst_discard(struct sk_buff *skb);
-extern void *dst_alloc(struct dst_ops * ops, int initial_ref);
+extern void *dst_alloc(struct dst_ops * ops, struct net_device *dev,
+                      int initial_ref, int initial_obsolete, int flags);
 extern void __dst_free(struct dst_entry * dst);
 extern struct dst_entry *dst_destroy(struct dst_entry * dst);
 
@@ -438,6 +430,5 @@ extern struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig
                                     const struct flowi *fl, struct sock *sk,
                                     int flags);
 #endif
-#endif
 
 #endif /* _NET_DST_H */