]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: dont drop MTU reduction indications
authorEric Dumazet <edumazet@google.com>
Mon, 23 Jul 2012 07:48:52 +0000 (09:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Jul 2012 07:58:46 +0000 (00:58 -0700)
commitfb46d10d8edb56056f0224388b013c6b325d8eae
treee9ce502c1f32bea966c81d5597d0a29eb4b9d244
parentc1e24731e1b04974c1277a254b4bc132ac11ddf0
tcp: dont drop MTU reduction indications

ICMP messages generated in output path if frame length is bigger than
mtu are actually lost because socket is owned by user (doing the xmit)

One example is the ipgre_tunnel_xmit() calling
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));

We had a similar case fixed in commit d0bdaff7c70 (ipv6: disable GSO on
sockets hitting dst_allfrag).

Problem of such fix is that it relied on retransmit timers, so short tcp
sessions paid a too big latency increase price.

This patch uses the tcp_release_cb() infrastructure so that MTU
reduction messages (ICMP messages) are not lost, and no extra delay
is added in TCP transmits.

Reported-by: Maciej Żenczykowski <maze@google.com>
Diagnosed-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Nandita Dukkipati <nanditad@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Tore Anderson <tore@fud.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/tcp.h
include/net/sock.h
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_output.c
net/ipv6/tcp_ipv6.c