diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2008-09-21 00:22:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-21 00:22:59 -0400 |
commit | 61eb55f4db7eaf5fb2d5ec12981a8cda755bb0e1 (patch) | |
tree | 6bb8fd2656adf1275e6866a3d981b78a432fc285 /net/ipv4/tcp_output.c | |
parent | 34638570b58290e8cb875fb24dcbe836ffeb6cb8 (diff) |
tcp: Reorganize skb tagbit checks
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_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 6f2a3f4a1af3..2f24ecc37067 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -2032,6 +2032,7 @@ void tcp_xmit_retransmit_queue(struct sock *sk) | |||
2032 | const struct inet_connection_sock *icsk = inet_csk(sk); | 2032 | const struct inet_connection_sock *icsk = inet_csk(sk); |
2033 | struct tcp_sock *tp = tcp_sk(sk); | 2033 | struct tcp_sock *tp = tcp_sk(sk); |
2034 | struct sk_buff *skb; | 2034 | struct sk_buff *skb; |
2035 | int mib_idx; | ||
2035 | 2036 | ||
2036 | if (tp->retransmit_skb_hint) | 2037 | if (tp->retransmit_skb_hint) |
2037 | skb = tp->retransmit_skb_hint; | 2038 | skb = tp->retransmit_skb_hint; |
@@ -2059,27 +2060,26 @@ void tcp_xmit_retransmit_queue(struct sock *sk) | |||
2059 | return; | 2060 | return; |
2060 | if (!before(TCP_SKB_CB(skb)->seq, tp->retransmit_high)) | 2061 | if (!before(TCP_SKB_CB(skb)->seq, tp->retransmit_high)) |
2061 | break; | 2062 | break; |
2063 | if (sacked & (TCPCB_SACKED_ACKED|TCPCB_SACKED_RETRANS)) | ||
2064 | continue; | ||
2062 | 2065 | ||
2063 | if (sacked & TCPCB_LOST) { | 2066 | if (!(sacked & TCPCB_LOST)) |
2064 | if (!(sacked & (TCPCB_SACKED_ACKED|TCPCB_SACKED_RETRANS))) { | 2067 | continue; |
2065 | int mib_idx; | 2068 | |
2066 | 2069 | if (tcp_retransmit_skb(sk, skb)) { | |
2067 | if (tcp_retransmit_skb(sk, skb)) { | 2070 | tp->retransmit_skb_hint = NULL; |
2068 | tp->retransmit_skb_hint = NULL; | 2071 | return; |
2069 | return; | ||
2070 | } | ||
2071 | if (icsk->icsk_ca_state != TCP_CA_Loss) | ||
2072 | mib_idx = LINUX_MIB_TCPFASTRETRANS; | ||
2073 | else | ||
2074 | mib_idx = LINUX_MIB_TCPSLOWSTARTRETRANS; | ||
2075 | NET_INC_STATS_BH(sock_net(sk), mib_idx); | ||
2076 | |||
2077 | if (skb == tcp_write_queue_head(sk)) | ||
2078 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, | ||
2079 | inet_csk(sk)->icsk_rto, | ||
2080 | TCP_RTO_MAX); | ||
2081 | } | ||
2082 | } | 2072 | } |
2073 | if (icsk->icsk_ca_state != TCP_CA_Loss) | ||
2074 | mib_idx = LINUX_MIB_TCPFASTRETRANS; | ||
2075 | else | ||
2076 | mib_idx = LINUX_MIB_TCPSLOWSTARTRETRANS; | ||
2077 | NET_INC_STATS_BH(sock_net(sk), mib_idx); | ||
2078 | |||
2079 | if (skb == tcp_write_queue_head(sk)) | ||
2080 | inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, | ||
2081 | inet_csk(sk)->icsk_rto, | ||
2082 | TCP_RTO_MAX); | ||
2083 | } | 2083 | } |
2084 | } | 2084 | } |
2085 | 2085 | ||