aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/udp.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-11-08 05:17:58 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-08 23:53:06 -0500
commit512615b6b843ff3ff5ad583f34c39b3f302f5f26 (patch)
tree7420705a314bc691bc478225148935dc67f71904 /include/linux/udp.h
parentd4cada4ae1c012815f95fa507eb86a0ae9d607d7 (diff)
udp: secondary hash on (local port, local address)
Extends udp_table to contain a secondary hash table. socket anchor for this second hash is free, because UDP doesnt use skc_bind_node : We define an union to hold both skc_bind_node & a new hlist_nulls_node udp_portaddr_node udp_lib_get_port() inserts sockets into second hash chain (additional cost of one atomic op) udp_lib_unhash() deletes socket from second hash chain (additional cost of one atomic op) Note : No spinlock lockdep annotation is needed, because lock for the secondary hash chain is always get after lock for primary hash chain. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/udp.h')
-rw-r--r--include/linux/udp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/udp.h b/include/linux/udp.h
index 5b4b5274e683..59f0ddf2d284 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -57,6 +57,7 @@ struct udp_sock {
57 struct inet_sock inet; 57 struct inet_sock inet;
58#define udp_port_hash inet.sk.__sk_common.skc_u16hashes[0] 58#define udp_port_hash inet.sk.__sk_common.skc_u16hashes[0]
59#define udp_portaddr_hash inet.sk.__sk_common.skc_u16hashes[1] 59#define udp_portaddr_hash inet.sk.__sk_common.skc_u16hashes[1]
60#define udp_portaddr_node inet.sk.__sk_common.skc_portaddr_node
60 int pending; /* Any pending frames ? */ 61 int pending; /* Any pending frames ? */
61 unsigned int corkflag; /* Cork is required */ 62 unsigned int corkflag; /* Cork is required */
62 __u16 encap_type; /* Is this an Encapsulation socket? */ 63 __u16 encap_type; /* Is this an Encapsulation socket? */