Revert "net-tcp_bbr: v2: adjust skb tx.in_flight upon split in tcp_fragment()"
This reverts commit eddb362fbb
.
This commit is contained in:
parent
77303eca0a
commit
1f9b6d5fff
2 changed files with 1 additions and 40 deletions
|
@ -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.
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Add table
Reference in a new issue