aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2009-03-14 10:23:04 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-15 23:09:53 -0400
commit72211e90501f954f586481c25521c3724cda3cc7 (patch)
treec794106a2ea0ba62053247513ecd624a0160a54e /net/ipv4/tcp_input.c
parentc887e6d2d9aee56ee7c9f2af4cec3a5efdcc4c72 (diff)
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: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index b7d02c5dd6da..311c30f73ee4 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2836,7 +2836,7 @@ static void tcp_mtup_probe_failed(struct sock *sk)
2836 icsk->icsk_mtup.probe_size = 0; 2836 icsk->icsk_mtup.probe_size = 0;
2837} 2837}
2838 2838
2839static void tcp_mtup_probe_success(struct sock *sk, struct sk_buff *skb) 2839static void tcp_mtup_probe_success(struct sock *sk)
2840{ 2840{
2841 struct tcp_sock *tp = tcp_sk(sk); 2841 struct tcp_sock *tp = tcp_sk(sk);
2842 struct inet_connection_sock *icsk = inet_csk(sk); 2842 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 acked_pcount = tcp_skb_pcount(skb); 3219 acked_pcount = tcp_skb_pcount(skb);
3220 } 3220 }
3221 3221
3222 /* MTU probing checks */
3223 if (fully_acked && icsk->icsk_mtup.probe_size &&
3224 !after(tp->mtu_probe.probe_seq_end, scb->end_seq)) {
3225 tcp_mtup_probe_success(sk, skb);
3226 }
3227
3228 if (sacked & TCPCB_RETRANS) { 3222 if (sacked & TCPCB_RETRANS) {
3229 if (sacked & TCPCB_SACKED_RETRANS) 3223 if (sacked & TCPCB_SACKED_RETRANS)
3230 tp->retrans_out -= acked_pcount; 3224 tp->retrans_out -= acked_pcount;
@@ -3287,6 +3281,11 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
3287 const struct tcp_congestion_ops *ca_ops 3281 const struct tcp_congestion_ops *ca_ops
3288 = inet_csk(sk)->icsk_ca_ops; 3282 = inet_csk(sk)->icsk_ca_ops;
3289 3283
3284 if (unlikely(icsk->icsk_mtup.probe_size &&
3285 !after(tp->mtu_probe.probe_seq_end, tp->snd_una))) {
3286 tcp_mtup_probe_success(sk);
3287 }
3288
3290 tcp_ack_update_rtt(sk, flag, seq_rtt); 3289 tcp_ack_update_rtt(sk, flag, seq_rtt);
3291 tcp_rearm_rto(sk); 3290 tcp_rearm_rto(sk);
3292 3291