From: Yuchung Cheng <ycheng@google.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Yuchung Cheng <ycheng@google.com>,
Neal Cardwell <ncardwell@google.com>,
Eric Dumazet <edumazet@google.com>
Subject: [PATCH net-next 1/7] tcp: apply Kern's check on RTTs used for congestion control
Date: Fri, 16 Oct 2015 21:57:41 -0700 [thread overview]
Message-ID: <1445057867-32257-2-git-send-email-ycheng@google.com> (raw)
In-Reply-To: <1445057867-32257-1-git-send-email-ycheng@google.com>
Currently ca_seq_rtt_us does not use Kern's check. Fix that by
checking if any packet acked is a retransmit, for both RTT used
for RTT estimation and congestion control.
Fixes: 5b08e47ca ("tcp: prefer packet timing to TS-ECR for RTT")
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/ipv4/tcp_input.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 3b35c3f..38743e5 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2925,9 +2925,6 @@ static inline bool tcp_ack_update_rtt(struct sock *sk, const int flag,
* Karn's algorithm forbids taking RTT if some retransmitted data
* is acked (RFC6298).
*/
- if (flag & FLAG_RETRANS_DATA_ACKED)
- seq_rtt_us = -1L;
-
if (seq_rtt_us < 0)
seq_rtt_us = sack_rtt_us;
@@ -3169,7 +3166,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
flag |= FLAG_SACK_RENEGING;
skb_mstamp_get(&now);
- if (likely(first_ackt.v64)) {
+ if (likely(first_ackt.v64) && !(flag & FLAG_RETRANS_DATA_ACKED)) {
seq_rtt_us = skb_mstamp_us_delta(&now, &first_ackt);
ca_rtt_us = skb_mstamp_us_delta(&now, &last_ackt);
}
--
2.6.0.rc2.230.g3dd15c0
next prev parent reply other threads:[~2015-10-17 4:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-17 4:57 [PATCH net-next 0/7] RACK loss detection Yuchung Cheng
2015-10-17 4:57 ` Yuchung Cheng [this message]
2016-02-02 19:30 ` [PATCH net-next 1/7] tcp: apply Kern's check on RTTs used for congestion control Kenneth Klette Jonassen
2016-02-02 23:28 ` Yuchung Cheng
2015-10-17 4:57 ` [PATCH net-next 2/7] tcp: track min RTT using windowed min-filter Yuchung Cheng
2015-10-14 9:28 ` Andrew Shewmaker
2015-10-18 14:33 ` Neal Cardwell
2015-10-14 13:25 ` Andrew Shewmaker
2015-10-19 4:39 ` Andrew Shewmaker
2015-10-17 4:57 ` [PATCH net-next 3/7] tcp: remove tcp_mark_lost_retrans() Yuchung Cheng
2015-10-17 4:57 ` [PATCH net-next 4/7] tcp: add tcp_tsopt_ecr_before helper Yuchung Cheng
2015-10-17 4:57 ` [PATCH net-next 5/7] tcp: skb_mstamp_after helper Yuchung Cheng
2015-10-17 4:57 ` [PATCH net-next 6/7] tcp: track the packet timings in RACK Yuchung Cheng
2015-10-17 4:57 ` [PATCH net-next 7/7] tcp: use RACK to detect losses Yuchung Cheng
2015-10-21 14:01 ` [PATCH net-next 0/7] RACK loss detection David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1445057867-32257-2-git-send-email-ycheng@google.com \
--to=ycheng@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).