aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tcp.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-07-23 03:48:52 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-23 03:58:46 -0400
commit563d34d05786263893ba4a1042eb9b9374127cf5 (patch)
treee9ce502c1f32bea966c81d5597d0a29eb4b9d244 /include/linux/tcp.h
parentc3def943c7117d42caaed3478731ea7c3c87190e (diff)
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 a34a101e1e6 (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>
Diffstat (limited to 'include/linux/tcp.h')
-rw-r--r--include/linux/tcp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 2761856987b2..eb125a4c30b3 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -493,6 +493,9 @@ struct tcp_sock {
493 u32 probe_seq_start; 493 u32 probe_seq_start;
494 u32 probe_seq_end; 494 u32 probe_seq_end;
495 } mtu_probe; 495 } mtu_probe;
496 u32 mtu_info; /* We received an ICMP_FRAG_NEEDED / ICMPV6_PKT_TOOBIG
497 * while socket was owned by user.
498 */
496 499
497#ifdef CONFIG_TCP_MD5SIG 500#ifdef CONFIG_TCP_MD5SIG
498/* TCP AF-Specific parts; only used by MD5 Signature support so far */ 501/* TCP AF-Specific parts; only used by MD5 Signature support so far */
@@ -518,6 +521,9 @@ enum tsq_flags {
518 TCP_TSQ_DEFERRED, /* tcp_tasklet_func() found socket was owned */ 521 TCP_TSQ_DEFERRED, /* tcp_tasklet_func() found socket was owned */
519 TCP_WRITE_TIMER_DEFERRED, /* tcp_write_timer() found socket was owned */ 522 TCP_WRITE_TIMER_DEFERRED, /* tcp_write_timer() found socket was owned */
520 TCP_DELACK_TIMER_DEFERRED, /* tcp_delack_timer() found socket was owned */ 523 TCP_DELACK_TIMER_DEFERRED, /* tcp_delack_timer() found socket was owned */
524 TCP_MTU_REDUCED_DEFERRED, /* tcp_v{4|6}_err() could not call
525 * tcp_v{4|6}_mtu_reduced()
526 */
521}; 527};
522 528
523static inline struct tcp_sock *tcp_sk(const struct sock *sk) 529static inline struct tcp_sock *tcp_sk(const struct sock *sk)