aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/tcp.h6
-rw-r--r--net/ipv4/tcp_output.c3
2 files changed, 5 insertions, 4 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 33599d17522d..e6d0002a1b0b 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1771,12 +1771,12 @@ static inline void tcp_highest_sack_reset(struct sock *sk)
1771 tcp_sk(sk)->highest_sack = tcp_write_queue_head(sk); 1771 tcp_sk(sk)->highest_sack = tcp_write_queue_head(sk);
1772} 1772}
1773 1773
1774/* Called when old skb is about to be deleted (to be combined with new skb) */ 1774/* Called when old skb is about to be deleted and replaced by new skb */
1775static inline void tcp_highest_sack_combine(struct sock *sk, 1775static inline void tcp_highest_sack_replace(struct sock *sk,
1776 struct sk_buff *old, 1776 struct sk_buff *old,
1777 struct sk_buff *new) 1777 struct sk_buff *new)
1778{ 1778{
1779 if (tcp_sk(sk)->sacked_out && (old == tcp_sk(sk)->highest_sack)) 1779 if (old == tcp_highest_sack(sk))
1780 tcp_sk(sk)->highest_sack = new; 1780 tcp_sk(sk)->highest_sack = new;
1781} 1781}
1782 1782
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index ae60dd3faed0..823003eef3a2 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2062,6 +2062,7 @@ static int tcp_mtu_probe(struct sock *sk)
2062 nskb->ip_summed = skb->ip_summed; 2062 nskb->ip_summed = skb->ip_summed;
2063 2063
2064 tcp_insert_write_queue_before(nskb, skb, sk); 2064 tcp_insert_write_queue_before(nskb, skb, sk);
2065 tcp_highest_sack_replace(sk, skb, nskb);
2065 2066
2066 len = 0; 2067 len = 0;
2067 tcp_for_write_queue_from_safe(skb, next, sk) { 2068 tcp_for_write_queue_from_safe(skb, next, sk) {
@@ -2665,7 +2666,7 @@ static bool tcp_collapse_retrans(struct sock *sk, struct sk_buff *skb)
2665 else if (!skb_shift(skb, next_skb, next_skb_size)) 2666 else if (!skb_shift(skb, next_skb, next_skb_size))
2666 return false; 2667 return false;
2667 } 2668 }
2668 tcp_highest_sack_combine(sk, next_skb, skb); 2669 tcp_highest_sack_replace(sk, next_skb, skb);
2669 2670
2670 tcp_unlink_write_queue(next_skb, sk); 2671 tcp_unlink_write_queue(next_skb, sk);
2671 2672