diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index ba8a8e3464aa..0bf032839548 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1929,11 +1929,11 @@ static bool tcp_is_rack(const struct sock *sk) | |||
1929 | static void tcp_timeout_mark_lost(struct sock *sk) | 1929 | static void tcp_timeout_mark_lost(struct sock *sk) |
1930 | { | 1930 | { |
1931 | struct tcp_sock *tp = tcp_sk(sk); | 1931 | struct tcp_sock *tp = tcp_sk(sk); |
1932 | struct sk_buff *skb; | 1932 | struct sk_buff *skb, *head; |
1933 | bool is_reneg; /* is receiver reneging on SACKs? */ | 1933 | bool is_reneg; /* is receiver reneging on SACKs? */ |
1934 | 1934 | ||
1935 | skb = tcp_rtx_queue_head(sk); | 1935 | head = tcp_rtx_queue_head(sk); |
1936 | is_reneg = skb && (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED); | 1936 | is_reneg = head && (TCP_SKB_CB(head)->sacked & TCPCB_SACKED_ACKED); |
1937 | if (is_reneg) { | 1937 | if (is_reneg) { |
1938 | NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPSACKRENEGING); | 1938 | NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPSACKRENEGING); |
1939 | tp->sacked_out = 0; | 1939 | tp->sacked_out = 0; |
@@ -1943,9 +1943,13 @@ static void tcp_timeout_mark_lost(struct sock *sk) | |||
1943 | tcp_reset_reno_sack(tp); | 1943 | tcp_reset_reno_sack(tp); |
1944 | } | 1944 | } |
1945 | 1945 | ||
1946 | skb = head; | ||
1946 | skb_rbtree_walk_from(skb) { | 1947 | skb_rbtree_walk_from(skb) { |
1947 | if (is_reneg) | 1948 | if (is_reneg) |
1948 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_SACKED_ACKED; | 1949 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_SACKED_ACKED; |
1950 | else if (tcp_is_rack(sk) && skb != head && | ||
1951 | tcp_rack_skb_timeout(tp, skb, 0) > 0) | ||
1952 | continue; /* Don't mark recently sent ones lost yet */ | ||
1949 | tcp_mark_skb_lost(sk, skb); | 1953 | tcp_mark_skb_lost(sk, skb); |
1950 | } | 1954 | } |
1951 | tcp_verify_left_out(tp); | 1955 | tcp_verify_left_out(tp); |
@@ -1972,7 +1976,7 @@ void tcp_enter_loss(struct sock *sk) | |||
1972 | tcp_ca_event(sk, CA_EVENT_LOSS); | 1976 | tcp_ca_event(sk, CA_EVENT_LOSS); |
1973 | tcp_init_undo(tp); | 1977 | tcp_init_undo(tp); |
1974 | } | 1978 | } |
1975 | tp->snd_cwnd = 1; | 1979 | tp->snd_cwnd = tcp_packets_in_flight(tp) + 1; |
1976 | tp->snd_cwnd_cnt = 0; | 1980 | tp->snd_cwnd_cnt = 0; |
1977 | tp->snd_cwnd_stamp = tcp_jiffies32; | 1981 | tp->snd_cwnd_stamp = tcp_jiffies32; |
1978 | 1982 | ||