netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neal Cardwell <ncardwell@google.com>
To: Yuchung Cheng <ycheng@google.com>
Cc: David Miller <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Nandita Dukkipati <nanditad@google.com>,
	Netdev <netdev@vger.kernel.org>
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: <CADVnQy=D61fQHtYuQW07Nx8QpPR8jESH7gvrdbUNu-vwMuEy3Q@mail.gmail.com> (raw)
In-Reply-To: <1374385170-358-3-git-send-email-ycheng@google.com>

On Sun, Jul 21, 2013 at 1:39 AM, Yuchung Cheng <ycheng@google.com> 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
tcp_clean_rtx_queue()).

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.

neal

  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:
  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='CADVnQy=D61fQHtYuQW07Nx8QpPR8jESH7gvrdbUNu-vwMuEy3Q@mail.gmail.com' \
    --to=ncardwell@google.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=nanditad@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=ycheng@google.com \
    /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).