Hi David Lot of routers still use CPUS with 32 bytes cache lines. (Intel PIII) It make sense to make sure fields used at lookup time are in the same cache line, to reduce cache footprint and speedup lookups.
Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]>
--- linux/include/net/inetpeer.h 2006-10-18 09:30:12.000000000 +0200 +++ linux-ed/include/net/inetpeer.h 2006-10-18 09:32:17.000000000 +0200 @@ -17,14 +17,15 @@ struct inet_peer { + /* group together avl_left,avl_right,v4daddr to speedup lookups */ struct inet_peer *avl_left, *avl_right; + __u32 v4daddr; /* peer's address */ + __u16 avl_height; + __u16 ip_id_count; /* IP ID for the next packet */ struct inet_peer *unused_next, **unused_prevp; __u32 dtime; /* the time of last use of not * referenced entries */ atomic_t refcnt; - __u32 v4daddr; /* peer's address */ - __u16 avl_height; - __u16 ip_id_count; /* IP ID for the next packet */ atomic_t rid; /* Frag reception counter */ __u32 tcp_ts; unsigned long tcp_ts_stamp;