From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>, netdev@vger.kernel.org
Subject: Re: [PATCH net 3/5] tcp: move false FR condition into tcp_false_fast_retrans_possible()
Date: Wed, 07 Mar 2018 07:50:39 -0800 [thread overview]
Message-ID: <1520437839.109662.40.camel@gmail.com> (raw)
In-Reply-To: <1520427569-14365-4-git-send-email-ilpo.jarvinen@helsinki.fi>
On Wed, 2018-03-07 at 14:59 +0200, Ilpo Järvinen wrote:
> No functional changes.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
> ---
> net/ipv4/tcp_input.c | 21 +++++++++++++++++----
> 1 file changed, 17 insertions(+), 4 deletions(-)
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 1a33752..e20f9ad 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -2211,6 +2211,19 @@ static void tcp_update_scoreboard(struct sock
> *sk, int fast_rexmit)
> }
> }
>
> +/* False fast retransmits may occur when SACK is not in use under
> certain
> + * conditions (RFC6582). The sender MUST hold old state until
> something
> + * *above* high_seq is ACKed to prevent triggering such false fast
> + * retransmits. SACK TCP is safe.
> + */
> +static bool tcp_false_fast_retrans_possible(const struct sock *sk,
> + const u32 snd_una)
> +{
> + const struct tcp_sock *tp = tcp_sk(sk);
> +
> + return ((snd_una == tp->high_seq) && tcp_is_reno(tp));
return (EXPR);
should use instead :
return EXPR;
> +}
> +
> static bool tcp_tsopt_ecr_before(const struct tcp_sock *tp, u32
> when)
> {
> return tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr &&
> @@ -2350,10 +2363,10 @@ static bool tcp_try_undo_recovery(struct sock
> *sk)
> } else if (tp->rack.reo_wnd_persist) {
> tp->rack.reo_wnd_persist--;
> }
> - if (tp->snd_una == tp->high_seq && tcp_is_reno(tp)) {
> - /* Hold old state until something *above* high_seq
> - * is ACKed. For Reno it is MUST to prevent false
> - * fast retransmits (RFC2582). SACK TCP is safe. */
> + if (tcp_false_fast_retrans_possible(sk, tp->snd_una)) {
> + /* Hold old state until something *above* high_seq
> is ACKed
> + * if false fast retransmit is possible.
> + */
> if (!tcp_any_retrans_done(sk))
> tp->retrans_stamp = 0;
> return true;
next prev parent reply other threads:[~2018-03-07 15:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 12:59 [PATCH net 0/5] tcp: fixes to non-SACK TCP Ilpo Järvinen
2018-03-07 12:59 ` [PATCH net 1/5] tcp: feed correct number of pkts acked to cc modules also in recovery Ilpo Järvinen
2018-03-07 12:59 ` [PATCH net 2/5] tcp: prevent bogus FRTO undos with non-SACK flows Ilpo Järvinen
2018-03-07 19:24 ` Neal Cardwell
2018-03-07 19:54 ` Yuchung Cheng
2018-03-07 22:19 ` Ilpo Järvinen
2018-03-07 12:59 ` [PATCH net 3/5] tcp: move false FR condition into tcp_false_fast_retrans_possible() Ilpo Järvinen
2018-03-07 15:50 ` Eric Dumazet [this message]
2018-03-07 12:59 ` [PATCH net 4/5] tcp: prevent bogus undos when SACK is not enabled Ilpo Järvinen
2018-03-07 20:19 ` Neal Cardwell
2018-03-07 23:48 ` Yuchung Cheng
2018-03-09 14:11 ` Ilpo Järvinen
2018-03-09 14:32 ` Eric Dumazet
2018-03-09 15:28 ` David Miller
2018-03-09 15:23 ` David Miller
2018-03-09 19:23 ` Ilpo Järvinen
2018-03-13 10:24 ` Ilpo Järvinen
2018-03-07 12:59 ` [PATCH net 5/5] tcp: send real dupACKs by locking advertized window for non-SACK flows Ilpo Järvinen
2018-03-07 15:58 ` Eric Dumazet
2018-03-07 20:09 ` Ilpo Järvinen
2018-03-07 20:13 ` Eric Dumazet
2018-03-07 21:39 ` Ilpo Järvinen
2018-03-07 22:01 ` Eric Dumazet
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=1520437839.109662.40.camel@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=ilpo.jarvinen@helsinki.fi \
--cc=netdev@vger.kernel.org \
/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).