From: "Sébastien Barré" <sebastien.barre@uclouvain.be>
To: Yuchung Cheng <ycheng@google.com>, Eric Dumazet <eric.dumazet@gmail.com>
Cc: Neal Cardwell <ncardwell@google.com>,
David Miller <davem@davemloft.net>,
Netdev <netdev@vger.kernel.org>,
Gregory Detal <gregory.detal@uclouvain.be>,
Nandita Dukkipati <nanditad@google.com>
Subject: Re: [PATCH net-next v2] tcp: avoid reducing cwnd when ACK+DSACK is received
Date: Sat, 10 Jan 2015 12:51:49 +0100 [thread overview]
Message-ID: <54B11255.7000500@uclouvain.be> (raw)
In-Reply-To: <CAK6E8=dhW=0hRYHjjgBh0KwKOQfzHhwY2egusQ8S4tsoJb0Nsg@mail.gmail.com>
All,
Le 09/01/2015 20:43, Yuchung Cheng a écrit :
>
> Sebastien: I suggest breaking down by ACK types for readability. e.g.,
>
> /* This routine deals with acks during a TLP episode.
> * We mark the end of a TLP episode on receiving TLP dupack or when
> * ack is after tlp_high_seq.
> * Ref: loss detection algorithm in draft-dukkipati-tcpm-tcp-loss-probe.
> */
> static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag)
> {
> struct tcp_sock *tp = tcp_sk(sk);
>
> if (before(ack, tp->tlp_high_seq))
> return;
>
> if (flag & FLAG_DSACKING_ACK) {
> /* This DSACK means original and TLP probe arrived; no loss */
> tp->tlp_high_seq = 0;
> } else if (after(ack, tp->tlp_high_seq)) {
> /* ACK advances: there was a loss, so reduce cwnd. Reset
> * tlp_high_seq in tcp_init_cwnd_reduction()
Indeed, hadn't seen that.
> */
> tcp_init_cwnd_reduction(sk);
> tcp_set_ca_state(sk, TCP_CA_CWR);
> tcp_end_cwnd_reduction(sk);
> tcp_try_keep_open(sk);
> NET_INC_STATS_BH(sock_net(sk),
> LINUX_MIB_TCPLOSSPROBERECOVERY);
> } else if (!(flag & (FLAG_SND_UNA_ADVANCED |
> FLAG_NOT_DUP | FLAG_DATA_SACKED))) {
> /* Pure dupack: original and TLP probe arrived; no loss */
> tp->tlp_high_seq = 0;
> }
> }
That looks much more readable compared to my v2.
It is currently passing our tests (These are in fact MPTCP tests appart
from Neal's packetdrill that I will add, but actually the MPTCP stack
happens to reveal this situation quite easily, I think because in MPTCP,
we store the send queue in the "meta-flow", which currently cannot be
used for tail loss probes).
As probably everyone will be happy with this (Eric as well ?), I suggest
I prepare a v3 once all our tests are passed as well, with Yuchung's
structure and Neal's packetdrill test in the commit text. Will also add
proper credit as there is now stuff from several people in those few
lines now :-).
Looks good ?
Thanks again for your fast and helpful interactions !
Sébastien.
>
>>
next prev parent reply other threads:[~2015-01-10 11:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 12:20 [PATCH net-next v2] tcp: avoid reducing cwnd when ACK+DSACK is received Sébastien Barré
2015-01-08 15:07 ` Eric Dumazet
2015-01-08 15:24 ` Sébastien Barré
2015-01-08 15:43 ` Neal Cardwell
2015-01-08 16:00 ` Sébastien Barré
2015-01-08 15:59 ` Eric Dumazet
2015-01-08 15:19 ` Eric Dumazet
2015-01-08 15:39 ` Sébastien Barré
2015-01-08 15:49 ` Neal Cardwell
2015-01-08 15:52 ` Neal Cardwell
2015-01-08 16:25 ` Eric Dumazet
2015-01-08 17:17 ` Eric Dumazet
2015-01-08 17:27 ` Eric Dumazet
2015-01-09 19:43 ` Yuchung Cheng
2015-01-09 20:36 ` Neal Cardwell
2015-01-10 11:51 ` Sébastien Barré [this message]
2015-01-10 17:37 ` Eric Dumazet
2015-01-12 11:52 ` David Laight
2015-01-12 15:02 ` 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=54B11255.7000500@uclouvain.be \
--to=sebastien.barre@uclouvain.be \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=gregory.detal@uclouvain.be \
--cc=nanditad@google.com \
--cc=ncardwell@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).