From: "Sébastien Barré" <sebastien.barre@uclouvain.be>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>, <netdev@vger.kernel.org>,
Gregory Detal <gregory.detal@uclouvain.be>,
Nandita Dukkipati <nanditad@google.com>,
Yuchung Cheng <ycheng@google.com>,
Neal Cardwell <ncardwell@google.com>
Subject: Re: [PATCH net-next v2] tcp: avoid reducing cwnd when ACK+DSACK is received
Date: Thu, 8 Jan 2015 16:39:04 +0100 [thread overview]
Message-ID: <54AEA498.5030202@uclouvain.be> (raw)
In-Reply-To: <1420730396.5947.55.camel@edumazet-glaptop2.roam.corp.google.com>
Le 08/01/2015 16:19, Eric Dumazet a écrit :
> On Thu, 2015-01-08 at 13:20 +0100, Sébastien Barré wrote:
>> When the peer has delayed ack enabled, it may reply to a probe with an
>> ACK+D-SACK, with ack value set to tlp_high_seq. In the current code,
>> such ACK+DSACK will be missed and only at next, higher ack will the TLP
>> episode be considered done. Since the DSACK is not present anymore,
>> this will cost a cwnd reduction.
>>
> ...
>> net/ipv4/tcp_input.c | 30 +++++++++++++-----------------
>> 1 file changed, 13 insertions(+), 17 deletions(-)
>>
>> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
>> index 075ab4d..cf63a29 100644
>> --- a/net/ipv4/tcp_input.c
>> +++ b/net/ipv4/tcp_input.c
>> @@ -3363,29 +3363,25 @@ static void tcp_replace_ts_recent(struct tcp_sock *tp, u32 seq)
>> static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag)
>> {
>> struct tcp_sock *tp = tcp_sk(sk);
>> - bool is_tlp_dupack = (ack == tp->tlp_high_seq) &&
>> - !(flag & (FLAG_SND_UNA_ADVANCED |
>> - FLAG_NOT_DUP | FLAG_DATA_SACKED));
>>
> No idea why you removed this bool, it really helped to understand the
> code. This makes your patch looks more complex than needed.
I did not remove it in v1
(http://www.spinics.net/lists/netdev/msg308653.html)
The removal was a request from Neal
(http://www.spinics.net/lists/netdev/msg308758.html)
I think he found it special to have part of the logic apart, in a bool,
and part of it in the if condition.
One possible option is to restore is_tlp_dupack and include the DSACK
check in it, although this will
not do much more than moving complexity in the bool definition. But
indeed, that might make
the patch more readable.
What do you and Neal think ?
regards,
Sébastien.
>
>> /* Mark the end of TLP episode on receiving TLP dupack or when
>> * ack is after tlp_high_seq.
>> + * With delayed acks, we may also get a regular ACK+DSACK, in which
>> + * case we don't want to reduce the cwnd either.
>> */
>> - if (is_tlp_dupack) {
>> + if (((ack == tp->tlp_high_seq) &&
>> + !(flag & (FLAG_SND_UNA_ADVANCED |
>> + FLAG_NOT_DUP | FLAG_DATA_SACKED))) ||
>> + (!before(ack, tp->tlp_high_seq) && (flag & FLAG_DSACKING_ACK))) {
>> tp->tlp_high_seq = 0;
>> - return;
>> - }
>
next prev parent reply other threads:[~2015-01-08 15:39 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é [this message]
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é
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=54AEA498.5030202@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).