Commit 61eb55f4 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller

tcp: Reorganize skb tagbit checks

Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 34638570
...@@ -2032,6 +2032,7 @@ void tcp_xmit_retransmit_queue(struct sock *sk) ...@@ -2032,6 +2032,7 @@ void tcp_xmit_retransmit_queue(struct sock *sk)
const struct inet_connection_sock *icsk = inet_csk(sk); const struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *skb; struct sk_buff *skb;
int mib_idx;
if (tp->retransmit_skb_hint) if (tp->retransmit_skb_hint)
skb = tp->retransmit_skb_hint; skb = tp->retransmit_skb_hint;
...@@ -2059,27 +2060,26 @@ void tcp_xmit_retransmit_queue(struct sock *sk) ...@@ -2059,27 +2060,26 @@ void tcp_xmit_retransmit_queue(struct sock *sk)
return; return;
if (!before(TCP_SKB_CB(skb)->seq, tp->retransmit_high)) if (!before(TCP_SKB_CB(skb)->seq, tp->retransmit_high))
break; break;
if (sacked & (TCPCB_SACKED_ACKED|TCPCB_SACKED_RETRANS))
continue;
if (sacked & TCPCB_LOST) { if (!(sacked & TCPCB_LOST))
if (!(sacked & (TCPCB_SACKED_ACKED|TCPCB_SACKED_RETRANS))) { continue;
int mib_idx;
if (tcp_retransmit_skb(sk, skb)) {
if (tcp_retransmit_skb(sk, skb)) { tp->retransmit_skb_hint = NULL;
tp->retransmit_skb_hint = NULL; return;
return;
}
if (icsk->icsk_ca_state != TCP_CA_Loss)
mib_idx = LINUX_MIB_TCPFASTRETRANS;
else
mib_idx = LINUX_MIB_TCPSLOWSTARTRETRANS;
NET_INC_STATS_BH(sock_net(sk), mib_idx);
if (skb == tcp_write_queue_head(sk))
inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
inet_csk(sk)->icsk_rto,
TCP_RTO_MAX);
}
} }
if (icsk->icsk_ca_state != TCP_CA_Loss)
mib_idx = LINUX_MIB_TCPFASTRETRANS;
else
mib_idx = LINUX_MIB_TCPSLOWSTARTRETRANS;
NET_INC_STATS_BH(sock_net(sk), mib_idx);
if (skb == tcp_write_queue_head(sk))
inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
inet_csk(sk)->icsk_rto,
TCP_RTO_MAX);
} }
} }
......
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