aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/tcp.h7
-rw-r--r--net/ipv4/tcp_input.c5
-rw-r--r--net/ipv4/tcp_output.c4
3 files changed, 5 insertions, 11 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 8983386356a5..b71676326950 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1035,7 +1035,7 @@ static inline void tcp_mib_init(struct net *net)
1035} 1035}
1036 1036
1037/* from STCP */ 1037/* from STCP */
1038static inline void tcp_clear_retrans_hints_partial(struct tcp_sock *tp) 1038static inline void tcp_clear_all_retrans_hints(struct tcp_sock *tp)
1039{ 1039{
1040 tp->lost_skb_hint = NULL; 1040 tp->lost_skb_hint = NULL;
1041 tp->scoreboard_skb_hint = NULL; 1041 tp->scoreboard_skb_hint = NULL;
@@ -1043,11 +1043,6 @@ static inline void tcp_clear_retrans_hints_partial(struct tcp_sock *tp)
1043 tp->forward_skb_hint = NULL; 1043 tp->forward_skb_hint = NULL;
1044} 1044}
1045 1045
1046static inline void tcp_clear_all_retrans_hints(struct tcp_sock *tp)
1047{
1048 tcp_clear_retrans_hints_partial(tp);
1049}
1050
1051/* MD5 Signature */ 1046/* MD5 Signature */
1052struct crypto_hash; 1047struct crypto_hash;
1053 1048
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index f79a51607292..7306bfb16cdb 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1883,7 +1883,7 @@ static void tcp_enter_frto_loss(struct sock *sk, int allowed_segments, int flag)
1883 tp->high_seq = tp->snd_nxt; 1883 tp->high_seq = tp->snd_nxt;
1884 TCP_ECN_queue_cwr(tp); 1884 TCP_ECN_queue_cwr(tp);
1885 1885
1886 tcp_clear_retrans_hints_partial(tp); 1886 tcp_clear_all_retrans_hints(tp);
1887} 1887}
1888 1888
1889static void tcp_clear_retrans_partial(struct tcp_sock *tp) 1889static void tcp_clear_retrans_partial(struct tcp_sock *tp)
@@ -1934,12 +1934,11 @@ void tcp_enter_loss(struct sock *sk, int how)
1934 /* Push undo marker, if it was plain RTO and nothing 1934 /* Push undo marker, if it was plain RTO and nothing
1935 * was retransmitted. */ 1935 * was retransmitted. */
1936 tp->undo_marker = tp->snd_una; 1936 tp->undo_marker = tp->snd_una;
1937 tcp_clear_retrans_hints_partial(tp);
1938 } else { 1937 } else {
1939 tp->sacked_out = 0; 1938 tp->sacked_out = 0;
1940 tp->fackets_out = 0; 1939 tp->fackets_out = 0;
1941 tcp_clear_all_retrans_hints(tp);
1942 } 1940 }
1941 tcp_clear_all_retrans_hints(tp);
1943 1942
1944 tcp_for_write_queue(skb, sk) { 1943 tcp_for_write_queue(skb, sk) {
1945 if (skb == tcp_send_head(sk)) 1944 if (skb == tcp_send_head(sk))
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 8165f5aa8c71..11490958a096 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -750,7 +750,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,
750 750
751 BUG_ON(len > skb->len); 751 BUG_ON(len > skb->len);
752 752
753 tcp_clear_retrans_hints_partial(tp); 753 tcp_clear_all_retrans_hints(tp);
754 nsize = skb_headlen(skb) - len; 754 nsize = skb_headlen(skb) - len;
755 if (nsize < 0) 755 if (nsize < 0)
756 nsize = 0; 756 nsize = 0;
@@ -1823,7 +1823,7 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb,
1823 tp->packets_out -= tcp_skb_pcount(next_skb); 1823 tp->packets_out -= tcp_skb_pcount(next_skb);
1824 1824
1825 /* changed transmit queue under us so clear hints */ 1825 /* changed transmit queue under us so clear hints */
1826 tcp_clear_retrans_hints_partial(tp); 1826 tcp_clear_all_retrans_hints(tp);
1827 1827
1828 sk_wmem_free_skb(sk, next_skb); 1828 sk_wmem_free_skb(sk, next_skb);
1829} 1829}