diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-11-08 05:18:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-08 23:53:07 -0500 |
commit | 5051ebd275de672b807c28d93002c2fb0514a3c9 (patch) | |
tree | bfbf0d9f1b231671a8ee20d92a04d26860eb38b1 /net/ipv6 | |
parent | 512615b6b843ff3ff5ad583f34c39b3f302f5f26 (diff) |
ipv4: udp: optimize unicast RX path
We first locate the (local port) hash chain head
If few sockets are in this chain, we proceed with previous lookup algo.
If too many sockets are listed, we take a look at the secondary
(port, address) hash chain we added in previous patch.
We choose the shortest chain and proceed with a RCU lookup on the elected chain.
But, if we chose (port, address) chain, and fail to find a socket on given address,
we must try another lookup on (port, INADDR_ANY) chain to find socket not bound
to a particular IP.
-> No extra cost for typical setups, where the first lookup will probabbly
be performed.
RCU lookups everywhere, we dont acquire spinlock.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
0 files changed, 0 insertions, 0 deletions