Skip to content

Commit fc22579

Browse files
edumazetdavem330
authored andcommitted
tcp: fix data delivery rate
Now skb->mstamp_skb is updated later, we also need to call tcp_rate_skb_sent() after the update is done. Fixes: 8c72c65 ("tcp: update skb->skb_mstamp more carefully") Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Soheil Hassas Yeganeh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e67b8a6 commit fc22579

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

net/ipv4/tcp_output.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,8 +1002,6 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
10021002
if (clone_it) {
10031003
TCP_SKB_CB(skb)->tx.in_flight = TCP_SKB_CB(skb)->end_seq
10041004
- tp->snd_una;
1005-
tcp_rate_skb_sent(sk, skb);
1006-
10071005
oskb = skb;
10081006
if (unlikely(skb_cloned(skb)))
10091007
skb = pskb_copy(skb, gfp_mask);
@@ -1128,9 +1126,10 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
11281126
tcp_enter_cwr(sk);
11291127
err = net_xmit_eval(err);
11301128
}
1131-
if (!err && oskb)
1129+
if (!err && oskb) {
11321130
oskb->skb_mstamp = tp->tcp_mstamp;
1133-
1131+
tcp_rate_skb_sent(sk, oskb);
1132+
}
11341133
return err;
11351134
}
11361135

0 commit comments

Comments
 (0)