From: David Miller <davem@davemloft.net>
To: baruch@ev-en.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 3/3] Check num sacks in SACK fast path
Date: Wed, 31 Jan 2007 12:52:46 -0800 (PST) [thread overview]
Message-ID: <20070131.125246.85686582.davem@davemloft.net> (raw)
In-Reply-To: <20070129071349.24050.56022.sendpatchset@galon.ev-en.org>
From: Baruch Even <baruch@ev-en.org>
Date: Mon, 29 Jan 2007 09:13:49 +0200
> When we check for SACK fast path make sure that we also have the same number of
> SACK blocks in the cache and in the new SACK data. This prevents us from
> mistakenly taking the cache data if the old data in the SACK cache is the same
> as the data in the SACK block.
>
> Signed-Off-By: Baruch Even <baruch@ev-en.org>
We could implement this without extra state, for example by
clearing out the rest of the recv_sack_cache entries.
We should never see a SACK block from sequence zero to zero,
which would be an empty SACK block.
Something like the following?
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index c26076f..84cd722 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -999,6 +1001,10 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
return 0;
}
}
+ for (; i <= 4; i++) {
+ tp->recv_sack_cache[i].start_seq = 0;
+ tp->recv_sack_cache[i].end_seq = 0;
+ }
if (flag)
num_sacks = 1;
next prev parent reply other threads:[~2007-01-31 20:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070129071339.24050.21052.sendpatchset@galon.ev-en.org>
2007-01-31 20:48 ` [PATCH 1/3] Advance fast path pointer for first block only David Miller
2007-02-01 7:38 ` Baruch Even
[not found] ` <20070129071344.24050.14971.sendpatchset@galon.ev-en.org>
2007-01-31 20:49 ` [PATCH 2/3] Seperate DSACK from SACK fast path David Miller
[not found] ` <20070129071349.24050.56022.sendpatchset@galon.ev-en.org>
2007-01-31 20:52 ` David Miller [this message]
2007-02-01 7:22 ` [PATCH 3/3] Check num sacks in " Baruch Even
2007-02-01 22:38 ` David Miller
[not found] <20070202144116.26863.3722.sendpatchset@galon.ev-en.org>
[not found] ` <20070202144127.26863.97696.sendpatchset@galon.ev-en.org>
2007-02-05 7:38 ` David Miller
2007-01-27 16:47 [PATCH 0/3] Fix issues with SACK processing Baruch Even
2007-01-27 16:50 ` [PATCH 3/3] Check num sacks in SACK fast path Baruch Even
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=20070131.125246.85686582.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=baruch@ev-en.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.