net: Make flow cache paths use a const struct flowi.
[cascardo/linux.git] / include / net / dst.h
index 484f80b..4fedffd 100644 (file)
@@ -78,8 +78,6 @@ struct dst_entry {
        atomic_t                __refcnt;       /* client references    */
        int                     __use;
        unsigned long           lastuse;
-       unsigned long           rate_last;      /* rate limiting for ICMP */
-       unsigned int            rate_tokens;
        int                     flags;
 #define DST_HOST               0x0001
 #define DST_NOXFRM             0x0002
@@ -222,8 +220,6 @@ static inline u32
 dst_allfrag(const struct dst_entry *dst)
 {
        int ret = dst_feature(dst,  RTAX_FEATURE_ALLFRAG);
-       /* Yes, _exactly_. This is paranoia. */
-       barrier();
        return ret;
 }
 
@@ -356,7 +352,7 @@ static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb)
 }
 
 extern int dst_discard(struct sk_buff *skb);
-extern void * dst_alloc(struct dst_ops * ops);
+extern void *dst_alloc(struct dst_ops * ops, int initial_ref);
 extern void __dst_free(struct dst_entry * dst);
 extern struct dst_entry *dst_destroy(struct dst_entry * dst);
 
@@ -432,20 +428,22 @@ enum {
 struct flowi;
 #ifndef CONFIG_XFRM
 static inline int xfrm_lookup(struct net *net, struct dst_entry **dst_p,
-                             struct flowi *fl, struct sock *sk, int flags)
+                             const struct flowi *fl, struct sock *sk,
+                             int flags)
 {
        return 0;
 } 
 static inline int __xfrm_lookup(struct net *net, struct dst_entry **dst_p,
-                               struct flowi *fl, struct sock *sk, int flags)
+                               const struct flowi *fl, struct sock *sk,
+                               int flags)
 {
        return 0;
 }
 #else
 extern int xfrm_lookup(struct net *net, struct dst_entry **dst_p,
-                      struct flowi *fl, struct sock *sk, int flags);
+                      const struct flowi *fl, struct sock *sk, int flags);
 extern int __xfrm_lookup(struct net *net, struct dst_entry **dst_p,
-                        struct flowi *fl, struct sock *sk, int flags);
+                        const struct flowi *fl, struct sock *sk, int flags);
 #endif
 #endif