From: Octavian Purdila <opurdila@ixiacom.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Jan-Bernd Themann" <themann@de.ibm.com>,
netdev@vger.kernel.org, Christoph Raisch <raisch@de.ibm.com>
Subject: Re: TSecr != 0 check in inet_lro.c
Date: Tue, 25 Aug 2009 14:50:38 +0300 [thread overview]
Message-ID: <200908251450.38751.opurdila@ixiacom.com> (raw)
In-Reply-To: <4A9379C9.6050108@gmail.com>
On Tuesday 25 August 2009 08:42:33 Eric Dumazet wrote:
> Octavian Purdila a écrit :
> > Hi,
> >
> > We are seeing a performance issue with TSO/LRO which we tracked down to
> > the TSecr !=0 check in lro_tcp_ip_check.
>
> ouch...
>
> > It happens when the LRO side's TSval wraps around and gets to 0. That
> > triggers the TSO side to send packets with TSecr set to 0, which means
> > that such packets won't be aggregated - and that will put a lot of burden
> > on the stack which will result in lots of drops.
>
> Probability of such event is 1 / 2^32 or so ?
>
Yes, its pretty low, but the timestamps are taken from jiffies and jiffies are
initialized to -300*HZ so it will happen in 5 minutes after every reboot :)
> > I'm failing to understand the purpose of this check. Any hints? :)
>
> rfc1323 badly interpreted ?
>
> I remember tsecr=0 was forbidden by Linux, while apparently rfc is not
> so clear.
>
> rfc1323 : 3.2
> The Timestamp Echo Reply field (TSecr) is only valid if the ACK
> bit is set in the TCP header; if it is valid, it echos a times-
> tamp value that was sent by the remote TCP in the TSval field
> of a Timestamps option. When TSecr is not valid, its value
> must be zero. The TSecr value will generally be from the most
> recent Timestamp option that was received; however, there are
> exceptions that are explained below.
>
> Note how this is not saying "a zero Tsecr value is not valid"
That is my understanding as well.
> I could not find why : "When TSecr is not valid, its value
> must be zero", and why we consider a zero value to be not meaningfull...
>
> ...
>
> So we dont have a bit saying we received a tsecr, we use the
> 'if saw_tstamp AND tsecr is not null' convention...
Alright, its starting to make sense. So, it looks like we can remove the check
from inet_lro, and that may even reduce the probability of receiving a zero
TSecr in the stack. Right?
Thanks for you help!
tavi
next prev parent reply other threads:[~2009-08-25 11:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-24 21:54 TSecr != 0 check in inet_lro.c Octavian Purdila
2009-08-25 5:42 ` Eric Dumazet
2009-08-25 11:50 ` Octavian Purdila [this message]
2009-09-01 22:46 ` David Miller
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=200908251450.38751.opurdila@ixiacom.com \
--to=opurdila@ixiacom.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=raisch@de.ibm.com \
--cc=themann@de.ibm.com \
/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).