aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-12-30 07:35:27 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:55:44 -0500
commit89d478f7f2160780be9d7c9c6bac9bd350d9ed96 (patch)
treeed1106721cc435718a979aa931e89bfd98bbac23 /net/ipv4/tcp_input.c
parent234b68607006f3721679e900809ccb99e8bfb10c (diff)
[TCP]: Remove duplicated code block from clean_rtx_queue
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c50
1 files changed, 21 insertions, 29 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index cb441188870c..6bc594a63c9d 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2801,42 +2801,34 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p,
2801 tcp_mtup_probe_success(sk, skb); 2801 tcp_mtup_probe_success(sk, skb);
2802 } 2802 }
2803 2803
2804 if (sacked) { 2804 if (sacked & TCPCB_RETRANS) {
2805 if (sacked & TCPCB_RETRANS) { 2805 if (sacked & TCPCB_SACKED_RETRANS)
2806 if (sacked & TCPCB_SACKED_RETRANS) 2806 tp->retrans_out -= packets_acked;
2807 tp->retrans_out -= packets_acked; 2807 flag |= FLAG_RETRANS_DATA_ACKED;
2808 flag |= FLAG_RETRANS_DATA_ACKED; 2808 ca_seq_rtt = -1;
2809 ca_seq_rtt = -1; 2809 seq_rtt = -1;
2810 seq_rtt = -1; 2810 if ((flag & FLAG_DATA_ACKED) ||
2811 if ((flag & FLAG_DATA_ACKED) || 2811 (packets_acked > 1))
2812 (packets_acked > 1)) 2812 flag |= FLAG_NONHEAD_RETRANS_ACKED;
2813 flag |= FLAG_NONHEAD_RETRANS_ACKED;
2814 } else {
2815 ca_seq_rtt = now - scb->when;
2816 last_ackt = skb->tstamp;
2817 if (seq_rtt < 0) {
2818 seq_rtt = ca_seq_rtt;
2819 }
2820 if (!(sacked & TCPCB_SACKED_ACKED))
2821 reord = min(cnt, reord);
2822 }
2823
2824 if (sacked & TCPCB_SACKED_ACKED)
2825 tp->sacked_out -= packets_acked;
2826 if (sacked & TCPCB_LOST)
2827 tp->lost_out -= packets_acked;
2828
2829 if ((sacked & TCPCB_URG) && tp->urg_mode &&
2830 !before(end_seq, tp->snd_up))
2831 tp->urg_mode = 0;
2832 } else { 2813 } else {
2833 ca_seq_rtt = now - scb->when; 2814 ca_seq_rtt = now - scb->when;
2834 last_ackt = skb->tstamp; 2815 last_ackt = skb->tstamp;
2835 if (seq_rtt < 0) { 2816 if (seq_rtt < 0) {
2836 seq_rtt = ca_seq_rtt; 2817 seq_rtt = ca_seq_rtt;
2837 } 2818 }
2838 reord = min(cnt, reord); 2819 if (!(sacked & TCPCB_SACKED_ACKED))
2820 reord = min(cnt, reord);
2839 } 2821 }
2822
2823 if (sacked & TCPCB_SACKED_ACKED)
2824 tp->sacked_out -= packets_acked;
2825 if (sacked & TCPCB_LOST)
2826 tp->lost_out -= packets_acked;
2827
2828 if ((sacked & TCPCB_URG) && tp->urg_mode &&
2829 !before(end_seq, tp->snd_up))
2830 tp->urg_mode = 0;
2831
2840 tp->packets_out -= packets_acked; 2832 tp->packets_out -= packets_acked;
2841 cnt += packets_acked; 2833 cnt += packets_acked;
2842 2834