aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2006-10-20 03:28:35 -0400
committerDavid S. Miller <davem@davemloft.net>2006-10-20 03:28:35 -0400
commit78d79423179c0efc7ec34b55d287e7be4ca07da6 (patch)
tree493041961b8da774b5d9c6a5cc00add000111137 /include/net
parent06ca719faddaf5ea46c6356b12847663c3ed8806 (diff)
[IPV4] inet_peer: Group together avl_left, avl_right, v4daddr to speedup lookups on some CPUS
Lot of routers/embedded devices still use CPUS with 16/32 bytes cache lines. (486, Pentium, ... PIII) It makes sense to group together fields used at lookup time so they fit in one cache line. This reduce cache footprint and speedup lookups. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/inetpeer.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index f13cc0c2b163..aa10a8178e70 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -17,14 +17,15 @@
17 17
18struct inet_peer 18struct inet_peer
19{ 19{
20 /* group together avl_left,avl_right,v4daddr to speedup lookups */
20 struct inet_peer *avl_left, *avl_right; 21 struct inet_peer *avl_left, *avl_right;
22 __be32 v4daddr; /* peer's address */
23 __u16 avl_height;
24 __u16 ip_id_count; /* IP ID for the next packet */
21 struct inet_peer *unused_next, **unused_prevp; 25 struct inet_peer *unused_next, **unused_prevp;
22 __u32 dtime; /* the time of last use of not 26 __u32 dtime; /* the time of last use of not
23 * referenced entries */ 27 * referenced entries */
24 atomic_t refcnt; 28 atomic_t refcnt;
25 __be32 v4daddr; /* peer's address */
26 __u16 avl_height;
27 __u16 ip_id_count; /* IP ID for the next packet */
28 atomic_t rid; /* Frag reception counter */ 29 atomic_t rid; /* Frag reception counter */
29 __u32 tcp_ts; 30 __u32 tcp_ts;
30 unsigned long tcp_ts_stamp; 31 unsigned long tcp_ts_stamp;