aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index b1c218df2c85..7d1efa762b75 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -163,7 +163,6 @@ static void tcp_event_data_sent(struct tcp_sock *tp,
163{ 163{
164 struct inet_connection_sock *icsk = inet_csk(sk); 164 struct inet_connection_sock *icsk = inet_csk(sk);
165 const u32 now = tcp_time_stamp; 165 const u32 now = tcp_time_stamp;
166 const struct dst_entry *dst = __sk_dst_get(sk);
167 166
168 if (sysctl_tcp_slow_start_after_idle && 167 if (sysctl_tcp_slow_start_after_idle &&
169 (!tp->packets_out && (s32)(now - tp->lsndtime) > icsk->icsk_rto)) 168 (!tp->packets_out && (s32)(now - tp->lsndtime) > icsk->icsk_rto))
@@ -174,9 +173,8 @@ static void tcp_event_data_sent(struct tcp_sock *tp,
174 /* If it is a reply for ato after last received 173 /* If it is a reply for ato after last received
175 * packet, enter pingpong mode. 174 * packet, enter pingpong mode.
176 */ 175 */
177 if ((u32)(now - icsk->icsk_ack.lrcvtime) < icsk->icsk_ack.ato && 176 if ((u32)(now - icsk->icsk_ack.lrcvtime) < icsk->icsk_ack.ato)
178 (!dst || !dst_metric(dst, RTAX_QUICKACK))) 177 icsk->icsk_ack.pingpong = 1;
179 icsk->icsk_ack.pingpong = 1;
180} 178}
181 179
182/* Account for an ACK we sent. */ 180/* Account for an ACK we sent. */
@@ -1776,7 +1774,7 @@ static bool tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb,
1776 if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) 1774 if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN)
1777 goto send_now; 1775 goto send_now;
1778 1776
1779 if (!((1 << icsk->icsk_ca_state) & (TCPF_CA_Open | TCPF_CA_CWR))) 1777 if (icsk->icsk_ca_state >= TCP_CA_Recovery)
1780 goto send_now; 1778 goto send_now;
1781 1779
1782 /* Avoid bursty behavior by allowing defer 1780 /* Avoid bursty behavior by allowing defer