@@ -99,7 +99,8 @@ static int tcp_orphan_retries(struct sock *sk, int alive)
return retries;
}
-static void tcp_mtu_probing(struct inet_connection_sock *icsk, struct sock *sk)
+static void tcp_blackhole_probe(struct inet_connection_sock *icsk,
+ struct sock *sk)
{
struct net *net = sock_net(sk);
@@ -113,7 +114,8 @@ static void tcp_mtu_probing(struct inet_connection_sock *icsk, struct sock *sk)
struct tcp_sock *tp = tcp_sk(sk);
int mss;
- mss = tcp_mtu_to_mss(sk, icsk->icsk_mtup.search_low) >> 1;
+ /* try mss smaller than current mss */
+ mss = tcp_current_mss(sk) >> 1;
mss = min(net->ipv4.sysctl_tcp_base_mss, mss);
mss = max(mss, 68 - tp->tcp_header_len);
icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss);
@@ -176,7 +178,7 @@ static int tcp_write_timeout(struct sock *sk)
} else {
if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0, 0)) {
/* Black hole detection */
- tcp_mtu_probing(icsk, sk);
+ tcp_blackhole_probe(icsk, sk);
dst_negative_advice(sk);
}
Reducing current tcp mss instead of search_low will make more sense, as current tcp mss still got lost. In addition, rename tcp_mtu_probing to tcp_blackhole_probe to clearify confusion between tcp_mtu_probing and tcp_mtu_probe. Signed-off-by: Fan Du <fan.du@intel.com> --- net/ipv4/tcp_timer.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)