]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[IPV4]: INET_MATCH() annotations
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 28 Sep 2006 01:43:07 +0000 (18:43 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 29 Sep 2006 01:02:25 +0000 (18:02 -0700)
commit4f765d842fa6e6fe15d555b247b640118d65b4dd
tree7a7d3ef7f8013c76811558c045d7aacfc7feeaff
parent45d60b9e29556a7831812ec338d82f4d3a4145f8
[IPV4]: INET_MATCH() annotations

INET_MATCH() and friends depend on an interesting set of kludges:
* there's a pair of adjacent fields in struct inet_sock - __be16 dport
followed by __u16 num.  We want to search by pair, so we combine the keys into
a single 32bit value and compare with 32bit value read from &...->dport.
* on 64bit targets we combine comparisons with pair of adjacent __be32
fields in the same way.

Make sure that we don't mix those values with anything else and that pairs
we form them from have correct types.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ipv6.h
include/net/inet_hashtables.h
net/ipv4/inet_hashtables.c
net/ipv6/inet6_hashtables.c