summaryrefslogtreecommitdiffstats
path: root/include/net/udp.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-11-09 06:26:33 +0100
committerDavid S. Miller <davem@davemloft.net>2009-11-11 05:54:38 +0100
commit30fff9231fad757c061285e347b33c5149c2c2e4 (patch)
tree79d07aba4b8de4367090442292e412d1ccf961ef /include/net/udp.h
parentbnx2x: version 1.52.1-4 (diff)
downloadlinux-30fff9231fad757c061285e347b33c5149c2c2e4.tar.xz
linux-30fff9231fad757c061285e347b33c5149c2c2e4.zip
udp: bind() optimisation
UDP bind() can be O(N^2) in some pathological cases. Thanks to secondary hash tables, we can make it O(N) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/udp.h')
-rw-r--r--include/net/udp.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/udp.h b/include/net/udp.h
index af41850f742a..5348d80b25bb 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -158,7 +158,8 @@ static inline void udp_lib_close(struct sock *sk, long timeout)
}
extern int udp_lib_get_port(struct sock *sk, unsigned short snum,
- int (*)(const struct sock*,const struct sock*));
+ int (*)(const struct sock *,const struct sock *),
+ unsigned int hash2_nulladdr);
/* net/ipv4/udp.c */
extern int udp_get_port(struct sock *sk, unsigned short snum,