Bluetooth: Make hci_send_sco() void
[safe/jmp/linux-2.6] / include / net / ip6_fib.h
index 7c5c0f7..4b1dc11 100644 (file)
 #include <net/flow.h>
 #include <net/netlink.h>
 
+#ifdef CONFIG_IPV6_MULTIPLE_TABLES
+#define FIB6_TABLE_HASHSZ 256
+#else
+#define FIB6_TABLE_HASHSZ 1
+#endif
+
 struct rt6_info;
 
-struct fib6_config
-{
+struct fib6_config {
        u32             fc_table;
        u32             fc_metric;
        int             fc_dst_len;
@@ -45,8 +50,7 @@ struct fib6_config
        struct nl_info  fc_nlinfo;
 };
 
-struct fib6_node
-{
+struct fib6_node {
        struct fib6_node        *parent;
        struct fib6_node        *left;
        struct fib6_node        *right;
@@ -72,48 +76,49 @@ struct fib6_node
  *
  */
 
-struct rt6key
-{
+struct rt6key {
        struct in6_addr addr;
        int             plen;
 };
 
 struct fib6_table;
 
-struct rt6_info
-{
+struct rt6_info {
        union {
                struct dst_entry        dst;
        } u;
 
-       struct inet6_dev                *rt6i_idev;
-
 #define rt6i_dev                       u.dst.dev
 #define rt6i_nexthop                   u.dst.neighbour
 #define rt6i_expires                   u.dst.expires
 
+       /*
+        * Tail elements of dst_entry (__refcnt etc.)
+        * and these elements (rarely used in hot path) are in
+        * the same cache line.
+        */
+       struct fib6_table               *rt6i_table;
        struct fib6_node                *rt6i_node;
 
        struct in6_addr                 rt6i_gateway;
-       
-       u32                             rt6i_flags;
-       u32                             rt6i_metric;
-       atomic_t                        rt6i_ref;
 
-       /* more non-fragment space at head required */
-       unsigned short                  rt6i_nfheader_len;
-
-       u8                              rt6i_protocol;
+       atomic_t                        rt6i_ref;
 
-       struct fib6_table               *rt6i_table;
+       /* These are in a separate cache line. */
+       struct rt6key                   rt6i_dst ____cacheline_aligned_in_smp;
+       u32                             rt6i_flags;
+       struct rt6key                   rt6i_src;
+       u32                             rt6i_metric;
 
-       struct rt6key                   rt6i_dst;
+       struct inet6_dev                *rt6i_idev;
 
 #ifdef CONFIG_XFRM
        u32                             rt6i_flow_cache_genid;
 #endif
+       /* more non-fragment space at head required */
+       unsigned short                  rt6i_nfheader_len;
 
-       struct rt6key                   rt6i_src;
+       u8                              rt6i_protocol;
 };
 
 static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
@@ -121,13 +126,14 @@ static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
        return ((struct rt6_info *)dst)->rt6i_idev;
 }
 
-struct fib6_walker_t
-{
-       struct fib6_walker_t *prev, *next;
+struct fib6_walker_t {
+       struct list_head lh;
        struct fib6_node *root, *node;
        struct rt6_info *leaf;
        unsigned char state;
        unsigned char prune;
+       unsigned int skip;
+       unsigned int count;
        int (*func)(struct fib6_walker_t *);
        void *args;
 };