Message ID | 1382630125-21416-1-git-send-email-ycheng@google.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Thu, Oct 24, 2013 at 11:55 AM, Yuchung Cheng <ycheng@google.com> wrote: > Patch ed08495c3 "tcp: use RTT from SACK for RTO" has a bug that > it does not check if the ACK acknowledge new data before taking > the RTT sample from TCP timestamps. This patch adds the check > back as required by the RFC. > > Signed-off-by: Yuchung Cheng <ycheng@google.com> > --- > net/ipv4/tcp_input.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Acked-by: Neal Cardwell <ncardwell@google.com> neal -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 2013-10-24 at 08:55 -0700, Yuchung Cheng wrote: > Patch ed08495c3 "tcp: use RTT from SACK for RTO" has a bug that > it does not check if the ACK acknowledge new data before taking > the RTT sample from TCP timestamps. This patch adds the check > back as required by the RFC. > > Signed-off-by: Yuchung Cheng <ycheng@google.com> > --- > net/ipv4/tcp_input.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c > index 305cd05..6ffe41a 100644 > --- a/net/ipv4/tcp_input.c > +++ b/net/ipv4/tcp_input.c > @@ -2856,7 +2856,8 @@ static inline bool tcp_ack_update_rtt(struct sock *sk, const int flag, > * left edge of the send window. > * See draft-ietf-tcplw-high-performance-00, section 3.3. > */ > - if (seq_rtt < 0 && tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr) > + if (seq_rtt < 0 && tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && > + flag & FLAG_ACKED) > seq_rtt = tcp_time_stamp - tp->rx_opt.rcv_tsecr; > > if (seq_rtt < 0) Acked-by: Eric Dumazet <edumazet@google.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Yuchung Cheng <ycheng@google.com> Date: Thu, 24 Oct 2013 08:55:25 -0700 > Patch ed08495c3 "tcp: use RTT from SACK for RTO" has a bug that > it does not check if the ACK acknowledge new data before taking > the RTT sample from TCP timestamps. This patch adds the check > back as required by the RFC. > > Signed-off-by: Yuchung Cheng <ycheng@google.com> Applied and queued up for -stable. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 305cd05..6ffe41a 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -2856,7 +2856,8 @@ static inline bool tcp_ack_update_rtt(struct sock *sk, const int flag, * left edge of the send window. * See draft-ietf-tcplw-high-performance-00, section 3.3. */ - if (seq_rtt < 0 && tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr) + if (seq_rtt < 0 && tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && + flag & FLAG_ACKED) seq_rtt = tcp_time_stamp - tp->rx_opt.rcv_tsecr; if (seq_rtt < 0)
Patch ed08495c3 "tcp: use RTT from SACK for RTO" has a bug that it does not check if the ACK acknowledge new data before taking the RTT sample from TCP timestamps. This patch adds the check back as required by the RFC. Signed-off-by: Yuchung Cheng <ycheng@google.com> --- net/ipv4/tcp_input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)