Commit 72211e90 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller

tcp: don't check mtu probe completion in the loop

It seems that no variables clash such that we couldn't do
the check just once later on. Therefore move it.

Also kill dead obvious comment, dead argument and add
unlikely since this mtu probe does not happen too often.
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c887e6d2
...@@ -2836,7 +2836,7 @@ static void tcp_mtup_probe_failed(struct sock *sk) ...@@ -2836,7 +2836,7 @@ static void tcp_mtup_probe_failed(struct sock *sk)
icsk->icsk_mtup.probe_size = 0; icsk->icsk_mtup.probe_size = 0;
} }
static void tcp_mtup_probe_success(struct sock *sk, struct sk_buff *skb) static void tcp_mtup_probe_success(struct sock *sk)
{ {
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk); struct inet_connection_sock *icsk = inet_csk(sk);
...@@ -3219,12 +3219,6 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets, ...@@ -3219,12 +3219,6 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
acked_pcount = tcp_skb_pcount(skb); acked_pcount = tcp_skb_pcount(skb);
} }
/* MTU probing checks */
if (fully_acked && icsk->icsk_mtup.probe_size &&
!after(tp->mtu_probe.probe_seq_end, scb->end_seq)) {
tcp_mtup_probe_success(sk, skb);
}
if (sacked & TCPCB_RETRANS) { if (sacked & TCPCB_RETRANS) {
if (sacked & TCPCB_SACKED_RETRANS) if (sacked & TCPCB_SACKED_RETRANS)
tp->retrans_out -= acked_pcount; tp->retrans_out -= acked_pcount;
...@@ -3287,6 +3281,11 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets, ...@@ -3287,6 +3281,11 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
const struct tcp_congestion_ops *ca_ops const struct tcp_congestion_ops *ca_ops
= inet_csk(sk)->icsk_ca_ops; = inet_csk(sk)->icsk_ca_ops;
if (unlikely(icsk->icsk_mtup.probe_size &&
!after(tp->mtu_probe.probe_seq_end, tp->snd_una))) {
tcp_mtup_probe_success(sk);
}
tcp_ack_update_rtt(sk, flag, seq_rtt); tcp_ack_update_rtt(sk, flag, seq_rtt);
tcp_rearm_rto(sk); tcp_rearm_rto(sk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment