aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-12-30 07:37:55 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:55:46 -0500
commit7201883599ac8bff76300117155e299b1a54092f (patch)
treefd3bbbad651ef99d911c71416899b5ff684b355c /net/ipv4/tcp_input.c
parentea60658cde9f4df7d05b95c81a72a95ad07f0701 (diff)
[TCP]: Cleanup local variables of 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.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 8e4d74ee31e2..263c536def5c 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2765,8 +2765,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p,
2765 u32 now = tcp_time_stamp; 2765 u32 now = tcp_time_stamp;
2766 int fully_acked = 1; 2766 int fully_acked = 1;
2767 int flag = 0; 2767 int flag = 0;
2768 int prior_packets = tp->packets_out; 2768 u32 pkts_acked = 0;
2769 u32 cnt = 0;
2770 u32 reord = tp->packets_out; 2769 u32 reord = tp->packets_out;
2771 s32 seq_rtt = -1; 2770 s32 seq_rtt = -1;
2772 s32 ca_seq_rtt = -1; 2771 s32 ca_seq_rtt = -1;
@@ -2775,7 +2774,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p,
2775 while ((skb = tcp_write_queue_head(sk)) && skb != tcp_send_head(sk)) { 2774 while ((skb = tcp_write_queue_head(sk)) && skb != tcp_send_head(sk)) {
2776 struct tcp_skb_cb *scb = TCP_SKB_CB(skb); 2775 struct tcp_skb_cb *scb = TCP_SKB_CB(skb);
2777 u32 end_seq; 2776 u32 end_seq;
2778 u32 packets_acked; 2777 u32 acked_pcount;
2779 u8 sacked = scb->sacked; 2778 u8 sacked = scb->sacked;
2780 2779
2781 /* Determine how many packets and what bytes were acked, tso and else */ 2780 /* Determine how many packets and what bytes were acked, tso and else */
@@ -2784,14 +2783,14 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p,
2784 !after(tp->snd_una, scb->seq)) 2783 !after(tp->snd_una, scb->seq))
2785 break; 2784 break;
2786 2785
2787 packets_acked = tcp_tso_acked(sk, skb); 2786 acked_pcount = tcp_tso_acked(sk, skb);
2788 if (!packets_acked) 2787 if (!acked_pcount)
2789 break; 2788 break;
2790 2789
2791 fully_acked = 0; 2790 fully_acked = 0;
2792 end_seq = tp->snd_una; 2791 end_seq = tp->snd_una;
2793 } else { 2792 } else {
2794 packets_acked = tcp_skb_pcount(skb); 2793 acked_pcount = tcp_skb_pcount(skb);
2795 end_seq = scb->end_seq; 2794 end_seq = scb->end_seq;
2796 } 2795 }
2797 2796
@@ -2803,12 +2802,12 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p,
2803 2802
2804 if (sacked & TCPCB_RETRANS) { 2803 if (sacked & TCPCB_RETRANS) {
2805 if (sacked & TCPCB_SACKED_RETRANS) 2804 if (sacked & TCPCB_SACKED_RETRANS)
2806 tp->retrans_out -= packets_acked; 2805 tp->retrans_out -= acked_pcount;
2807 flag |= FLAG_RETRANS_DATA_ACKED; 2806 flag |= FLAG_RETRANS_DATA_ACKED;
2808 ca_seq_rtt = -1; 2807 ca_seq_rtt = -1;
2809 seq_rtt = -1; 2808 seq_rtt = -1;
2810 if ((flag & FLAG_DATA_ACKED) || 2809 if ((flag & FLAG_DATA_ACKED) ||
2811 (packets_acked > 1)) 2810 (acked_pcount > 1))
2812 flag |= FLAG_NONHEAD_RETRANS_ACKED; 2811 flag |= FLAG_NONHEAD_RETRANS_ACKED;
2813 } else { 2812 } else {
2814 ca_seq_rtt = now - scb->when; 2813 ca_seq_rtt = now - scb->when;
@@ -2817,20 +2816,20 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p,
2817 seq_rtt = ca_seq_rtt; 2816 seq_rtt = ca_seq_rtt;
2818 } 2817 }
2819 if (!(sacked & TCPCB_SACKED_ACKED)) 2818 if (!(sacked & TCPCB_SACKED_ACKED))
2820 reord = min(cnt, reord); 2819 reord = min(pkts_acked, reord);
2821 } 2820 }
2822 2821
2823 if (sacked & TCPCB_SACKED_ACKED) 2822 if (sacked & TCPCB_SACKED_ACKED)
2824 tp->sacked_out -= packets_acked; 2823 tp->sacked_out -= acked_pcount;
2825 if (sacked & TCPCB_LOST) 2824 if (sacked & TCPCB_LOST)
2826 tp->lost_out -= packets_acked; 2825 tp->lost_out -= acked_pcount;
2827 2826
2828 if (unlikely((sacked & TCPCB_URG) && tp->urg_mode && 2827 if (unlikely((sacked & TCPCB_URG) && tp->urg_mode &&
2829 !before(end_seq, tp->snd_up))) 2828 !before(end_seq, tp->snd_up)))
2830 tp->urg_mode = 0; 2829 tp->urg_mode = 0;
2831 2830
2832 tp->packets_out -= packets_acked; 2831 tp->packets_out -= acked_pcount;
2833 cnt += packets_acked; 2832 pkts_acked += acked_pcount;
2834 2833
2835 /* Initial outgoing SYN's get put onto the write_queue 2834 /* Initial outgoing SYN's get put onto the write_queue
2836 * just like anything else we transmit. It is not 2835 * just like anything else we transmit. It is not
@@ -2855,7 +2854,6 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p,
2855 } 2854 }
2856 2855
2857 if (flag & FLAG_ACKED) { 2856 if (flag & FLAG_ACKED) {
2858 u32 pkts_acked = prior_packets - tp->packets_out;
2859 const struct tcp_congestion_ops *ca_ops 2857 const struct tcp_congestion_ops *ca_ops
2860 = inet_csk(sk)->icsk_ca_ops; 2858 = inet_csk(sk)->icsk_ca_ops;
2861 2859