From: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
To: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
Cc: LKML <linux-kernel@vger.kernel.org>, Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH][TCP]: simplify tcp_mark_lost_retrans()
Date: Wed, 07 Jan 2009 17:14:26 +0100 [thread overview]
Message-ID: <4964D4E2.8050602@nets.rwth-aachen.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0901071229160.27307@wrl-59.cs.helsinki.fi>
Ilpo Järvinen schrieb:
> On Wed, 7 Jan 2009, Arnd Hannemann wrote:
>
>
>> I noticed
>>
>
> Good that somebody else is looking TCP code besides me... :-)
>
Well I try hard... ;-)
>
>> that in tcp_mark_lost_retrans the for-loop is only entered
>> if tcp_is_fack(tp) evaluates to true:
>>
>> if (!tcp_is_fack(tp) || !tp->retrans_out ||
>> !after(received_upto, tp->lost_retrans_low) ||
>> icsk->icsk_ca_state != TCP_CA_Recovery)
>> return;
>>
>> Therefore the following check in the for-loop seems to be redundant,
>> because it always evaluates to true:
>>
>> (tcp_is_fack(tp) ||
>> !before(received_upto,
>> ack_seq + tp->reordering * tp->mss_cache))
>>
>> Did I miss something?
>>
>
> It was just a left over from the RFC3517 SACK addition which added that
> !tcp_is_fack(tp) there above. ...It would have been nice to have similar
> lost rexmit feature without FACK as well but calculating that wasn't
> trivial (or I didn't find that too trivial) and could end up being
> extremely expensive in case of large holes. (So I also left it there as
> sort of reminder).
>
Perhaps it would be better to let the comments reflect
what you just said and remove the redundant check
anyway to reduce the dead code a newcomer has to understand ;-)
I would have included a patch for the comments, but as you have a
deeper understanding of the code it would probably
be better if you can do it.
Best regards,
Arnd
next prev parent reply other threads:[~2009-01-07 16:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 9:25 [PATCH][TCP]: simplify tcp_mark_lost_retrans() Arnd Hannemann
2009-01-07 10:41 ` Ilpo Järvinen
2009-01-07 11:03 ` Ilpo Järvinen
2009-01-07 16:14 ` Arnd Hannemann [this message]
2009-01-16 20:13 ` Ilpo Järvinen
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=4964D4E2.8050602@nets.rwth-aachen.de \
--to=hannemann@nets.rwth-aachen.de \
--cc=ilpo.jarvinen@helsinki.fi \
--cc=linux-kernel@vger.kernel.org \
--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).