mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
[TCP]: Must count fack_count also when skipping
It makes fackets_out to grow too slowly compared with the real write queue. This shouldn't cause those BUG_TRAP(packets <= tp->packets_out) to trigger but how knows how such inconsistent fackets_out affects here and there around TCP when everything is nowadays assuming accurate fackets_out. So lets see if this silences them all. Reported by Guillaume Chazarain <guichaz@gmail.com>. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
401023710d
commit
d152a7d88a
@ -1367,7 +1367,7 @@ static struct sk_buff *tcp_sacktag_walk(struct sk_buff *skb, struct sock *sk,
|
|||||||
* a normal way
|
* a normal way
|
||||||
*/
|
*/
|
||||||
static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk,
|
static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk,
|
||||||
u32 skip_to_seq)
|
u32 skip_to_seq, int *fack_count)
|
||||||
{
|
{
|
||||||
tcp_for_write_queue_from(skb, sk) {
|
tcp_for_write_queue_from(skb, sk) {
|
||||||
if (skb == tcp_send_head(sk))
|
if (skb == tcp_send_head(sk))
|
||||||
@ -1375,6 +1375,8 @@ static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk,
|
|||||||
|
|
||||||
if (!before(TCP_SKB_CB(skb)->end_seq, skip_to_seq))
|
if (!before(TCP_SKB_CB(skb)->end_seq, skip_to_seq))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
*fack_count += tcp_skb_pcount(skb);
|
||||||
}
|
}
|
||||||
return skb;
|
return skb;
|
||||||
}
|
}
|
||||||
@ -1390,7 +1392,7 @@ static struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb,
|
|||||||
return skb;
|
return skb;
|
||||||
|
|
||||||
if (before(next_dup->start_seq, skip_to_seq)) {
|
if (before(next_dup->start_seq, skip_to_seq)) {
|
||||||
skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq);
|
skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq, fack_count);
|
||||||
tcp_sacktag_walk(skb, sk, NULL,
|
tcp_sacktag_walk(skb, sk, NULL,
|
||||||
next_dup->start_seq, next_dup->end_seq,
|
next_dup->start_seq, next_dup->end_seq,
|
||||||
1, fack_count, reord, flag);
|
1, fack_count, reord, flag);
|
||||||
@ -1537,7 +1539,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb,
|
|||||||
|
|
||||||
/* Head todo? */
|
/* Head todo? */
|
||||||
if (before(start_seq, cache->start_seq)) {
|
if (before(start_seq, cache->start_seq)) {
|
||||||
skb = tcp_sacktag_skip(skb, sk, start_seq);
|
skb = tcp_sacktag_skip(skb, sk, start_seq,
|
||||||
|
&fack_count);
|
||||||
skb = tcp_sacktag_walk(skb, sk, next_dup,
|
skb = tcp_sacktag_walk(skb, sk, next_dup,
|
||||||
start_seq,
|
start_seq,
|
||||||
cache->start_seq,
|
cache->start_seq,
|
||||||
@ -1565,7 +1568,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb,
|
|||||||
goto walk;
|
goto walk;
|
||||||
}
|
}
|
||||||
|
|
||||||
skb = tcp_sacktag_skip(skb, sk, cache->end_seq);
|
skb = tcp_sacktag_skip(skb, sk, cache->end_seq,
|
||||||
|
&fack_count);
|
||||||
/* Check overlap against next cached too (past this one already) */
|
/* Check overlap against next cached too (past this one already) */
|
||||||
cache++;
|
cache++;
|
||||||
continue;
|
continue;
|
||||||
@ -1577,7 +1581,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb,
|
|||||||
break;
|
break;
|
||||||
fack_count = tp->fackets_out;
|
fack_count = tp->fackets_out;
|
||||||
}
|
}
|
||||||
skb = tcp_sacktag_skip(skb, sk, start_seq);
|
skb = tcp_sacktag_skip(skb, sk, start_seq, &fack_count);
|
||||||
|
|
||||||
walk:
|
walk:
|
||||||
skb = tcp_sacktag_walk(skb, sk, next_dup, start_seq, end_seq,
|
skb = tcp_sacktag_walk(skb, sk, next_dup, start_seq, end_seq,
|
||||||
|
Loading…
Reference in New Issue
Block a user