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: Thu, 01 Feb 2007 14:38:00 -0800 (PST) [thread overview]
Message-ID: <20070201.143800.78710936.davem@davemloft.net> (raw)
In-Reply-To: <20070201072252.GX22455@galon.ev-en.org>
From: Baruch Even <baruch@ev-en.org>
Date: Thu, 1 Feb 2007 09:22:52 +0200
> * David Miller <davem@davemloft.net> [070131 22:52]:
> > We should never see a SACK block from sequence zero to zero,
> > which would be an empty SACK block.
>
> That would work as well at the cost of extra writing to memory for each
> ack packet. Though I won't guess what is worse, the extra memory used or
> the extra writing.
Good point. The recv_sack_cache is 32-bytes, so sits in at most
2 cache lines. The writes are consequetive and in order so would
compress into cpu store buffers.
But it's definitely not free. :-)
> > 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++) {
>
> That won't work though, the <= should be <, I've actually used
> ARRAY_SIZE just to be on the safe side.
Thanks for catching that.
next prev parent reply other threads:[~2007-02-01 22:38 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 ` [PATCH 3/3] Check num sacks in " David Miller
2007-02-01 7:22 ` Baruch Even
2007-02-01 22:38 ` David Miller [this message]
[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=20070201.143800.78710936.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 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).