From: David Miller <davem@davemloft.net>
To: ilpo.jarvinen@helsinki.fi
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] [TCP]: Process DSACKs that reside within a SACK block
Date: Wed, 31 Oct 2007 02:51:04 -0700 (PDT) [thread overview]
Message-ID: <20071031.025104.37987469.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0710311136200.16864@kivilampi-30.cs.helsinki.fi>
From: "Ilpo_Järvinen" <ilpo.jarvinen@helsinki.fi>
Date: Wed, 31 Oct 2007 11:48:31 +0200 (EET)
> DSACK inside another SACK block were missed if start_seq of DSACK
> was larger than SACK block's because sorting prioritizes full
> processing of the SACK block before DSACK. After SACK block
> sorting situation is like this:
>
> SSSSSSSSS
> D
> SSSSSS
> SSSSSSS
>
> Because write_queue is walked in-order, when the first SACK block
> has been processed, TCP is already past the skb for which the
> DSACK arrived and we haven't taught it to backtrack (nor should
> we), so TCP just continues processing by going to the next SACK
> block after the DSACK (if any).
>
> Whenever such DSACK is present, do an embedded checking during
> the previous SACK block.
>
> If the DSACK is below snd_una, there won't be overlapping SACK
> block, and thus no problem in that case. Also if start_seq of
> the DSACK is equal to the actual block, it will be processed
> first.
>
> Tested this by using netem to duplicate 15% of packets, and
> by printing SACK block when found_dup_sack is true and the
> selected skb in the dup_sack = 1 branch (if taken):
>
> SACK block 0: 4344-5792 (relative to snd_una 2019137317)
> SACK block 1: 4344-5792 (relative to snd_una 2019137317)
>
> equal start seqnos => next_dup = 0, dup_sack = 1 won't occur...
>
> SACK block 0: 5792-7240 (relative to snd_una 2019214061)
> SACK block 1: 2896-7240 (relative to snd_una 2019214061)
> DSACK skb match 5792-7240 (relative to snd_una)
>
> ...and next_dup = 1 case (after the not shown start_seq sort),
> went to dup_sack = 1 branch.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
I will queue this bug fix up, thanks Ilpo!
And thanks for all of the testing information, it helps review
enormously.
prev parent reply other threads:[~2007-10-31 9:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-31 9:48 [PATCH 1/2] [TCP]: Process DSACKs that reside within a SACK block Ilpo Järvinen
2007-10-31 9:49 ` [PATCH 2/2] [TCP]: Another TAGBITS -> SACKED_ACKED|LOST conversion Ilpo Järvinen
2007-10-31 9:51 ` David Miller
2007-10-31 9:51 ` David Miller [this message]
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=20071031.025104.37987469.davem@davemloft.net \
--to=davem@davemloft.net \
--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).