diff options
author | Eric Dumazet <edumazet@google.com> | 2013-08-03 14:50:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-03 14:53:54 -0400 |
commit | fba3679d34511c42bf452e89dda457a1219eb43a (patch) | |
tree | e15630906314e3243c2053887bd1f32af8a40f2e | |
parent | 73f5698e77219bfc3ea1903759fe8e20ab5b285e (diff) |
fib_rules: reorder struct fib_rules fields
Move refcnt, pref, suppress_ifgroup, suppress_prefixlen out of first
cache line, as they are not used in fast path.
Make sure ctarget & fr_net are in first cache line.
(Assuming 64 bit arches and 64 bytes cache lines)
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/fib_rules.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index 9d0fcbaa9cbb..4b2b557fb0e8 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h | |||
@@ -10,23 +10,25 @@ | |||
10 | 10 | ||
11 | struct fib_rule { | 11 | struct fib_rule { |
12 | struct list_head list; | 12 | struct list_head list; |
13 | atomic_t refcnt; | ||
14 | int iifindex; | 13 | int iifindex; |
15 | int oifindex; | 14 | int oifindex; |
16 | u32 mark; | 15 | u32 mark; |
17 | u32 mark_mask; | 16 | u32 mark_mask; |
18 | u32 pref; | ||
19 | u32 flags; | 17 | u32 flags; |
20 | u32 table; | 18 | u32 table; |
21 | int suppress_ifgroup; | ||
22 | int suppress_prefixlen; | ||
23 | u8 action; | 19 | u8 action; |
20 | /* 3 bytes hole, try to use */ | ||
24 | u32 target; | 21 | u32 target; |
25 | struct fib_rule __rcu *ctarget; | 22 | struct fib_rule __rcu *ctarget; |
23 | struct net *fr_net; | ||
24 | |||
25 | atomic_t refcnt; | ||
26 | u32 pref; | ||
27 | int suppress_ifgroup; | ||
28 | int suppress_prefixlen; | ||
26 | char iifname[IFNAMSIZ]; | 29 | char iifname[IFNAMSIZ]; |
27 | char oifname[IFNAMSIZ]; | 30 | char oifname[IFNAMSIZ]; |
28 | struct rcu_head rcu; | 31 | struct rcu_head rcu; |
29 | struct net * fr_net; | ||
30 | }; | 32 | }; |
31 | 33 | ||
32 | struct fib_lookup_arg { | 34 | struct fib_lookup_arg { |