mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
tcp: fix double-counted receiver RTT when leaving receiver fast path
[ Upstream commit aab2b4bf22
]
We should not update ts_recent and call tcp_rcv_rtt_measure_ts() both
before and after going to step5. That wastes CPU and double-counts the
receiver-side RTT sample.
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6202fe4eec
commit
8bd2b8faec
1 changed files with 3 additions and 3 deletions
|
@ -5519,6 +5519,9 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
|
||||||
if (tcp_checksum_complete_user(sk, skb))
|
if (tcp_checksum_complete_user(sk, skb))
|
||||||
goto csum_error;
|
goto csum_error;
|
||||||
|
|
||||||
|
if ((int)skb->truesize > sk->sk_forward_alloc)
|
||||||
|
goto step5;
|
||||||
|
|
||||||
/* Predicted packet is in window by definition.
|
/* Predicted packet is in window by definition.
|
||||||
* seq == rcv_nxt and rcv_wup <= rcv_nxt.
|
* seq == rcv_nxt and rcv_wup <= rcv_nxt.
|
||||||
* Hence, check seq<=rcv_wup reduces to:
|
* Hence, check seq<=rcv_wup reduces to:
|
||||||
|
@ -5530,9 +5533,6 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
|
||||||
|
|
||||||
tcp_rcv_rtt_measure_ts(sk, skb);
|
tcp_rcv_rtt_measure_ts(sk, skb);
|
||||||
|
|
||||||
if ((int)skb->truesize > sk->sk_forward_alloc)
|
|
||||||
goto step5;
|
|
||||||
|
|
||||||
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPHPHITS);
|
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPHPHITS);
|
||||||
|
|
||||||
/* Bulk data transfer: receiver */
|
/* Bulk data transfer: receiver */
|
||||||
|
|
Loading…
Reference in a new issue