diff options
author | Eric Dumazet <edumazet@google.com> | 2013-08-03 11:50:35 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-03 11:53:54 -0700 |
commit | fba3679d34511c42bf452e89dda457a1219eb43a (patch) | |
tree | e15630906314e3243c2053887bd1f32af8a40f2e /include/net/fib_rules.h | |
parent | 73f5698e77219bfc3ea1903759fe8e20ab5b285e (diff) | |
download | linux-fba3679d34511c42bf452e89dda457a1219eb43a.tar.bz2 |
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>
Diffstat (limited to 'include/net/fib_rules.h')
-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 @@ struct fib_rule { struct list_head list; - atomic_t refcnt; int iifindex; int oifindex; u32 mark; u32 mark_mask; - u32 pref; u32 flags; u32 table; - int suppress_ifgroup; - int suppress_prefixlen; u8 action; + /* 3 bytes hole, try to use */ u32 target; struct fib_rule __rcu *ctarget; + struct net *fr_net; + + atomic_t refcnt; + u32 pref; + int suppress_ifgroup; + int suppress_prefixlen; char iifname[IFNAMSIZ]; char oifname[IFNAMSIZ]; struct rcu_head rcu; - struct net * fr_net; }; struct fib_lookup_arg { |