archive mirror
 help / color / mirror / Atom feed
From: Neal Cardwell <>
To: Yuchung Cheng <>
Cc: David Miller <>,
	Eric Dumazet <>,
	Nandita Dukkipati <>,
	Netdev <>
Subject: Re: [PATCH 3/4 net-next] tcp: measure RTT from new SACK
Date: Sun, 21 Jul 2013 23:32:33 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sun, Jul 21, 2013 at 1:39 AM, Yuchung Cheng <> wrote:
> @@ -1148,6 +1149,7 @@ static u8 tcp_sacktag_one(struct sock *sk,
>                                                            state->reord);
>                                 if (!after(end_seq, tp->high_seq))
>                                         state->flag |= FLAG_ORIG_SACK_ACKED;
> +                               state->rtt = tcp_time_stamp - lsndtime;

To be safer we should probably take the RTT sample for the left-most
SACKed segment, just like tcp_clean_rtx_queue() takes a seq_rtt RTT
sample for the left-most cumulatively ACKed segment. Since
tcp_sacktag_write_queue() already sorts the SACK blocks, I think that
means tcp_sacktag_one() just needs to only set state->rtt if it is
still less than 0 (analagous to the update logic in

Also, FWIW I think the "lsndtime" variable name here is a little confusing,
since it is being used for the send time of the particular skb, which is
quite different from the similarly-named existing variable, tp->lsndttime.
Maybe "xmit_stamp"?

Otherwise, looks good. This is going to be nice to have.


  reply	other threads:[~2013-07-22  3:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-21  5:39 [PATCH 1/4 net-next] tcp: consolidate SYNACK RTT sampling Yuchung Cheng
2013-07-21  5:39 ` [PATCH 2/4 net-next] tcp: prefer packet timing to TS-ECR for RTT Yuchung Cheng
2013-07-22  3:17   ` Neal Cardwell
2013-07-21  5:39 ` [PATCH 3/4 net-next] tcp: measure RTT from new SACK Yuchung Cheng
2013-07-22  3:32   ` Neal Cardwell [this message]
2013-07-21  5:39 ` [PATCH 4/4 net-next] tcp: use RTT from SACK for RTO Yuchung Cheng
2013-07-22  3:40   ` Neal Cardwell
2013-07-22  2:45 ` [PATCH 1/4 net-next] tcp: consolidate SYNACK RTT sampling Neal Cardwell

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \ \ \
    --subject='Re: [PATCH 3/4 net-next] tcp: measure RTT from new SACK' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).