kernel-hacking-2024-linux-s.../net/ipv6
Eric Dumazet f86dcc5aa8 udp: dynamically size hash tables at boot time
UDP_HTABLE_SIZE was initialy defined to 128, which is a bit small for
several setups.

4000 active UDP sockets -> 32 sockets per chain in average. An
incoming frame has to lookup all sockets to find best match, so long
chains hurt latency.

Instead of a fixed size hash table that cant be perfect for every
needs, let UDP stack choose its table size at boot time like tcp/ip
route, using alloc_large_system_hash() helper

Add an optional boot parameter, uhash_entries=x so that an admin can
force a size between 256 and 65536 if needed, like thash_entries and
rhash_entries.

dmesg logs two new lines :
[    0.647039] UDP hash table entries: 512 (order: 0, 4096 bytes)
[    0.647099] UDP Lite hash table entries: 512 (order: 0, 4096 bytes)

Maximal size on 64bit arches would be 65536 slots, ie 1 MBytes for non
debugging spinlocks.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 22:00:22 -07:00
..
netfilter netfilter: ip6t_eui: fix read outside array bounds 2009-08-31 15:30:31 +02:00
addrconf.c make TLLAO option for NA packets configurable 2009-10-07 01:10:45 -07:00
addrconf_core.c
addrlabel.c
af_inet6.c net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
ah6.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
anycast.c
datagram.c IPv6: use ipv6_addr_set_v4mapped() 2009-10-07 13:58:25 -07:00
esp6.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
exthdrs.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
exthdrs_core.c
fib6_rules.c
icmp.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
inet6_connection_sock.c Use sk_mark for IPv6 routing lookups 2009-10-07 01:10:45 -07:00
inet6_hashtables.c
ip6_fib.c xfrm: select sane defaults for xfrm[4|6] gc_thresh 2009-07-30 18:52:15 -07:00
ip6_flowlabel.c
ip6_input.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
ip6_output.c ip: Report qdisc packet drops 2009-09-02 18:05:33 -07:00
ip6_tunnel.c tunnel: eliminate recursion field 2009-09-24 15:39:22 -07:00
ip6mr.c net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
ipcomp6.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
ipv6_sockglue.c Use sk_mark for IPv6 routing lookups 2009-10-07 01:10:45 -07:00
Kconfig IPv6: Fix 6RD typo 2009-10-07 14:50:30 -07:00
Makefile
mcast.c bonding: remap muticast addresses without using dev_close() and dev_open() 2009-09-15 02:37:40 -07:00
mip6.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
ndisc.c make TLLAO option for NA packets configurable 2009-10-07 01:10:45 -07:00
netfilter.c
proc.c net: mark read-only arrays as const 2009-08-05 10:42:58 -07:00
protocol.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
raw.c net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
reassembly.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
route.c IPv6: use ipv6_addr_copy() in ip6_route_redirect() 2009-10-07 13:58:01 -07:00
sit.c ipv6 sit: 6rd (IPv6 Rapid Deployment) Support. 2009-10-07 01:07:37 -07:00
syncookies.c Use sk_mark for IPv6 routing lookups 2009-10-07 01:10:45 -07:00
sysctl_net_ipv6.c inet6: functions shadow global variable 2009-08-02 12:54:30 -07:00
tcp_ipv6.c IPv6: use ipv6_addr_set_v4mapped() 2009-10-07 13:58:25 -07:00
tunnel6.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
udp.c udp: dynamically size hash tables at boot time 2009-10-07 22:00:22 -07:00
udp_impl.h net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
udplite.c net: constify struct inet6_protocol 2009-09-14 17:03:05 -07:00
xfrm6_input.c
xfrm6_mode_beet.c
xfrm6_mode_ro.c
xfrm6_mode_transport.c
xfrm6_mode_tunnel.c
xfrm6_output.c
xfrm6_policy.c xfrm6: Fix xfrm6_policy.c build when SYSCTL disabled. 2009-08-04 20:32:16 -07:00
xfrm6_state.c
xfrm6_tunnel.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00