Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[safe/jmp/linux-2.6] / include / net / route.h
index 4e8cae0..2c9fba7 100644 (file)
 
 struct fib_nh;
 struct inet_peer;
-struct rtable
-{
-       union
-       {
+struct rtable {
+       union {
                struct dst_entry        dst;
        } u;
 
@@ -77,16 +75,14 @@ struct rtable
        struct inet_peer        *peer; /* long-living peer info */
 };
 
-struct ip_rt_acct
-{
+struct ip_rt_acct {
        __u32   o_bytes;
        __u32   o_packets;
        __u32   i_bytes;
        __u32   i_packets;
 };
 
-struct rt_cache_stat 
-{
+struct rt_cache_stat {
         unsigned int in_hit;
         unsigned int in_slow_tot;
         unsigned int in_slow_mc;
@@ -105,13 +101,14 @@ struct rt_cache_stat
         unsigned int out_hlist_search;
 };
 
-extern struct ip_rt_acct *ip_rt_acct;
+extern struct ip_rt_acct __percpu *ip_rt_acct;
 
 struct in_device;
 extern int             ip_rt_init(void);
 extern void            ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw,
                                       __be32 src, struct net_device *dev);
 extern void            rt_cache_flush(struct net *net, int how);
+extern void            rt_cache_flush_batch(void);
 extern int             __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp);
 extern int             ip_route_output_key(struct net *, struct rtable **, struct flowi *flp);
 extern int             ip_route_output_flow(struct net *, struct rtable **rp, struct flowi *flp, struct sock *sk, int flags);
@@ -210,7 +207,7 @@ static inline struct inet_peer *rt_get_peer(struct rtable *rt)
 
 static inline int inet_iif(const struct sk_buff *skb)
 {
-       return skb->rtable->rt_iif;
+       return skb_rtable(skb)->rt_iif;
 }
 
 #endif /* _ROUTE_H */