android_kernel_google_msm/include
Eric Dumazet ad52eef552 inetpeer: get rid of ip_id_count
[ Upstream commit 73f156a6e8 ]

Ideally, we would need to generate IP ID using a per destination IP
generator.

linux kernels used inet_peer cache for this purpose, but this had a huge
cost on servers disabling MTU discovery.

1) each inet_peer struct consumes 192 bytes

2) inetpeer cache uses a binary tree of inet_peer structs,
   with a nominal size of ~66000 elements under load.

3) lookups in this tree are hitting a lot of cache lines, as tree depth
   is about 20.

4) If server deals with many tcp flows, we have a high probability of
   not finding the inet_peer, allocating a fresh one, inserting it in
   the tree with same initial ip_id_count, (cf secure_ip_id())

5) We garbage collect inet_peer aggressively.

IP ID generation do not have to be 'perfect'

Goal is trying to avoid duplicates in a short period of time,
so that reassembly units have a chance to complete reassembly of
fragments belonging to one message before receiving other fragments
with a recycled ID.

We simply use an array of generators, and a Jenkin hash using the dst IP
as a key.

ipv6_select_ident() is put back into net/ipv6/ip6_output.c where it
belongs (it is only used from this file)

secure_ip_id() and secure_ipv6_id() no longer are needed.

Rename ip_select_ident_more() to ip_select_ident_segs() to avoid
unnecessary decrement/increment of the number of segments.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-14 08:42:35 +08:00
..
acpi
asm-generic
crypto crypto: scatterwalk - Use sg_chain_ptr on chain entries 2013-12-11 22:34:12 -08:00
drm introduce SIZE_MAX 2014-07-31 12:54:53 -07:00
keys
linux Revert: "net: ip, ipv6: handle gso skbs in forwarding path" 2014-08-07 12:00:11 -07:00
math-emu
media media: v4l2: added missing mutex.h include to v4l2-ctrls.h 2013-09-26 17:15:49 -07:00
misc
mtd
net inetpeer: get rid of ip_id_count 2014-08-14 08:42:35 +08:00
pcmcia
rdma
rxrpc
scsi ore: Fix wrong math in allocation of per device BIO 2014-02-13 11:51:11 -08:00
sound ALSA: control: Protect user controls against concurrent access 2014-06-26 15:10:29 -04:00
target
trace tracing: Fix syscall_*regfunc() vs copy_process() race 2014-07-06 18:49:20 -07:00
video
xen xen-netfront: reduce gso_max_size to account for max TCP header 2014-06-07 16:02:15 -07:00
Kbuild