diff --git a/include/net/tcp.h b/include/net/tcp.h index fed4fa2d2..f74396efd 100755 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1192,21 +1192,6 @@ void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost, bool is_sack_reneg, struct rate_sample *rs); void tcp_rate_check_app_limited(struct sock *sk); -/* If a retransmit failed due to local qdisc congestion or other local issues, - * then we may have called tcp_set_skb_tso_segs() to increase the number of - * segments in the skb without increasing the tx.in_flight. In all other cases, - * the tx.in_flight should be at least as big as the pcount of the sk_buff. We - * do not have the state to know whether a retransmit failed due to local qdisc - * congestion or other local issues, so to avoid spurious warnings we consider - * that any skb marked lost may have suffered that fate. - */ -static inline bool tcp_skb_tx_in_flight_is_suspicious(u32 skb_pcount, - u32 skb_sacked_flags, - u32 tx_in_flight) -{ - return (skb_pcount > tx_in_flight) && !(skb_sacked_flags & TCPCB_LOST); -} - /* These functions determine how the current flow behaves in respect of SACK * handling. SACK is negotiated with the peer, and therefore it can vary * between different flows. diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index dc1180636..53edbacd1 100755 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1545,7 +1545,7 @@ int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue, { struct tcp_sock *tp = tcp_sk(sk); struct sk_buff *buff; - int nsize, old_factor, inflight_prev; + int nsize, old_factor; long limit; int nlen; u8 flags; @@ -1623,30 +1623,6 @@ int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue, if (diff) tcp_adjust_pcount(sk, skb, diff); - - inflight_prev = TCP_SKB_CB(skb)->tx.in_flight - old_factor; - if (inflight_prev < 0) { - WARN_ONCE(tcp_skb_tx_in_flight_is_suspicious( - old_factor, - TCP_SKB_CB(skb)->sacked, - TCP_SKB_CB(skb)->tx.in_flight), - "inconsistent: tx.in_flight: %u " - "old_factor: %d mss: %u sacked: %u " - "1st pcount: %d 2nd pcount: %d " - "1st len: %u 2nd len: %u ", - TCP_SKB_CB(skb)->tx.in_flight, old_factor, - mss_now, TCP_SKB_CB(skb)->sacked, - tcp_skb_pcount(skb), tcp_skb_pcount(buff), - skb->len, buff->len); - inflight_prev = 0; - } - /* Set 1st tx.in_flight as if 1st were sent by itself: */ - TCP_SKB_CB(skb)->tx.in_flight = inflight_prev + - tcp_skb_pcount(skb); - /* Set 2nd tx.in_flight with new 1st and 2nd pcounts: */ - TCP_SKB_CB(buff)->tx.in_flight = inflight_prev + - tcp_skb_pcount(skb) + - tcp_skb_pcount(buff); } /* Link BUFF into the send queue. */