aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 2868ef28ce52..1e37c1388189 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4268,7 +4268,7 @@ static void tcp_sack_new_ofo_skb(struct sock *sk, u32 seq, u32 end_seq)
4268 * If the sack array is full, forget about the last one. 4268 * If the sack array is full, forget about the last one.
4269 */ 4269 */
4270 if (this_sack >= TCP_NUM_SACKS) { 4270 if (this_sack >= TCP_NUM_SACKS) {
4271 if (tp->compressed_ack) 4271 if (tp->compressed_ack > TCP_FASTRETRANS_THRESH)
4272 tcp_send_ack(sk); 4272 tcp_send_ack(sk);
4273 this_sack--; 4273 this_sack--;
4274 tp->rx_opt.num_sacks--; 4274 tp->rx_opt.num_sacks--;
@@ -4363,6 +4363,7 @@ static bool tcp_try_coalesce(struct sock *sk,
4363 if (TCP_SKB_CB(from)->has_rxtstamp) { 4363 if (TCP_SKB_CB(from)->has_rxtstamp) {
4364 TCP_SKB_CB(to)->has_rxtstamp = true; 4364 TCP_SKB_CB(to)->has_rxtstamp = true;
4365 to->tstamp = from->tstamp; 4365 to->tstamp = from->tstamp;
4366 skb_hwtstamps(to)->hwtstamp = skb_hwtstamps(from)->hwtstamp;
4366 } 4367 }
4367 4368
4368 return true; 4369 return true;
@@ -5188,7 +5189,17 @@ send_now:
5188 if (!tcp_is_sack(tp) || 5189 if (!tcp_is_sack(tp) ||
5189 tp->compressed_ack >= sock_net(sk)->ipv4.sysctl_tcp_comp_sack_nr) 5190 tp->compressed_ack >= sock_net(sk)->ipv4.sysctl_tcp_comp_sack_nr)
5190 goto send_now; 5191 goto send_now;
5191 tp->compressed_ack++; 5192
5193 if (tp->compressed_ack_rcv_nxt != tp->rcv_nxt) {
5194 tp->compressed_ack_rcv_nxt = tp->rcv_nxt;
5195 if (tp->compressed_ack > TCP_FASTRETRANS_THRESH)
5196 NET_ADD_STATS(sock_net(sk), LINUX_MIB_TCPACKCOMPRESSED,
5197 tp->compressed_ack - TCP_FASTRETRANS_THRESH);
5198 tp->compressed_ack = 0;
5199 }
5200
5201 if (++tp->compressed_ack <= TCP_FASTRETRANS_THRESH)
5202 goto send_now;
5192 5203
5193 if (hrtimer_is_queued(&tp->compressed_ack_timer)) 5204 if (hrtimer_is_queued(&tp->compressed_ack_timer))
5194 return; 5205 return;