diff options
| author | Takashi Iwai <tiwai@suse.de> | 2015-12-10 14:40:26 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2015-12-10 14:40:26 +0100 |
| commit | e826d22e16c3230621a937e22f43c403d6e494a7 (patch) | |
| tree | 61bc8d95f5c3c7bdf93fac9ca57cd9d5b87a69b8 /net/ipv4/tcp_timer.c | |
| parent | 9a5e5234bafeaa2e9d15881d443c38d3d82d0b38 (diff) | |
| parent | 0bdf5a05647a66dcc6394986e061daeac9b1cf96 (diff) | |
Merge tag 'drm-i915-get-eld' into topic/hdmi-jack
Merge the latest i915 audio component changes for HDMI/DP get_eld ops.
This is actually used in HD-audio side in this branch.
Diffstat (limited to 'net/ipv4/tcp_timer.c')
| -rw-r--r-- | net/ipv4/tcp_timer.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index c9c716a483e4..193ba1fa8a9a 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -168,7 +168,7 @@ static int tcp_write_timeout(struct sock *sk) dst_negative_advice(sk); if (tp->syn_fastopen || tp->syn_data) tcp_fastopen_cache_set(sk, 0, NULL, true, 0); - if (tp->syn_data) + if (tp->syn_data && icsk->icsk_retransmits == 1) NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPFASTOPENACTIVEFAIL); } @@ -176,6 +176,18 @@ static int tcp_write_timeout(struct sock *sk) syn_set = true; } else { if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0, 0)) { + /* Some middle-boxes may black-hole Fast Open _after_ + * the handshake. Therefore we conservatively disable + * Fast Open on this path on recurring timeouts with + * few or zero bytes acked after Fast Open. + */ + if (tp->syn_data_acked && + tp->bytes_acked <= tp->rx_opt.mss_clamp) { + tcp_fastopen_cache_set(sk, 0, NULL, true, 0); + if (icsk->icsk_retransmits == sysctl_tcp_retries1) + NET_INC_STATS_BH(sock_net(sk), + LINUX_MIB_TCPFASTOPENACTIVEFAIL); + } /* Black hole detection */ tcp_mtu_probing(icsk, sk); |
