aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip6_fib.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ip6_fib.h')
-rw-r--r--include/net/ip6_fib.h43
1 files changed, 23 insertions, 20 deletions
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 257808188add..062a823d311c 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -84,38 +84,39 @@ struct rt6key {
84struct fib6_table; 84struct fib6_table;
85 85
86struct rt6_info { 86struct rt6_info {
87 union { 87 struct dst_entry dst;
88 struct dst_entry dst;
89 } u;
90 88
91 struct inet6_dev *rt6i_idev; 89#define rt6i_dev dst.dev
92 90#define rt6i_nexthop dst.neighbour
93#define rt6i_dev u.dst.dev 91#define rt6i_expires dst.expires
94#define rt6i_nexthop u.dst.neighbour
95#define rt6i_expires u.dst.expires
96 92
93 /*
94 * Tail elements of dst_entry (__refcnt etc.)
95 * and these elements (rarely used in hot path) are in
96 * the same cache line.
97 */
98 struct fib6_table *rt6i_table;
97 struct fib6_node *rt6i_node; 99 struct fib6_node *rt6i_node;
98 100
99 struct in6_addr rt6i_gateway; 101 struct in6_addr rt6i_gateway;
100
101 u32 rt6i_flags;
102 u32 rt6i_metric;
103 atomic_t rt6i_ref;
104 102
105 /* more non-fragment space at head required */ 103 atomic_t rt6i_ref;
106 unsigned short rt6i_nfheader_len;
107
108 u8 rt6i_protocol;
109 104
110 struct fib6_table *rt6i_table; 105 /* These are in a separate cache line. */
106 struct rt6key rt6i_dst ____cacheline_aligned_in_smp;
107 u32 rt6i_flags;
108 struct rt6key rt6i_src;
109 u32 rt6i_metric;
111 110
112 struct rt6key rt6i_dst; 111 struct inet6_dev *rt6i_idev;
113 112
114#ifdef CONFIG_XFRM 113#ifdef CONFIG_XFRM
115 u32 rt6i_flow_cache_genid; 114 u32 rt6i_flow_cache_genid;
116#endif 115#endif
116 /* more non-fragment space at head required */
117 unsigned short rt6i_nfheader_len;
117 118
118 struct rt6key rt6i_src; 119 u8 rt6i_protocol;
119}; 120};
120 121
121static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst) 122static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
@@ -124,11 +125,13 @@ static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
124} 125}
125 126
126struct fib6_walker_t { 127struct fib6_walker_t {
127 struct fib6_walker_t *prev, *next; 128 struct list_head lh;
128 struct fib6_node *root, *node; 129 struct fib6_node *root, *node;
129 struct rt6_info *leaf; 130 struct rt6_info *leaf;
130 unsigned char state; 131 unsigned char state;
131 unsigned char prune; 132 unsigned char prune;
133 unsigned int skip;
134 unsigned int count;
132 int (*func)(struct fib6_walker_t *); 135 int (*func)(struct fib6_walker_t *);
133 void *args; 136 void *args;
134}; 137};