All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hagen Paul Pfeifer <hagen@jauu.net>
To: Florian Westphal <fw@strlen.de>
Cc: netdev@vger.kernel.org, "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
Subject: Re: [PATCH 1/2] syncookies: do not store rcv_wscale in tcp timestamp
Date: Fri, 25 Jun 2010 00:14:16 +0200	[thread overview]
Message-ID: <20100624221416.GA31116@nuttenaction> (raw)
In-Reply-To: <20100624075304.GH27132@Chamillionaire.breakpoint.cc>

* Florian Westphal | 2010-06-24 09:53:04 [+0200]:

>> I speculate that this behavior was and is not correct. I suppose that their is
>> a race between the SYN/ACK where we initial force a particular window scale
>> and the next time where we recalculate the window via tcp_select_initial_window().
>
>Yes, but it is not the only one. We also do a route lookup to get the
>current window size.

Is this critical in any sense? The window size is a pure passive variable, we
do not announce any window information to the peer. I don't get the problem
for the window size.

>> If the user change net.core.rmem_max or net.ipv4.tcp_rmem in between this
>> time, the recalculated window scale (rcv_wscale) can be smaller. But the
>> receiver still operates with the initial window scale and can overshot the
>> granted window - and bang.
>
>Why "bang"?
>Sure, its not nice, but is it such a severe problem that we have to keep
>rcv_wscale around in the timestamp?

IMHO if we want a 100% race free behavior yes.

>>  or disable window scaling and don't transmit any scaling option
>> when SYN cookies are active.
>
>No, I would rather see this patch rejected than that.

Sure? SYN cookies are only active if we suffer under acute memory pressure. We
are likely not in the ability to backup large buffer space - why not limit
the window to 2^16 bytes which is sufficient for 99.9999% of the use case?
I do not identify any _real_ advantages to speed up a connection when the
server is under fire.

Another solution is to accept this patch and assume that this race is
rather artificial nature and does not happened. Sure, the race is very
unlikely[TM].

HGN

  reply	other threads:[~2010-06-24 22:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-21 21:48 [PATCH 1/2] syncookies: do not store rcv_wscale in tcp timestamp Florian Westphal
2010-06-21 21:48 ` [PATCH 2/2] syncookies: add support for ECN Florian Westphal
2010-06-27  5:00   ` David Miller
2010-06-23 20:28 ` [PATCH 1/2] syncookies: do not store rcv_wscale in tcp timestamp Hagen Paul Pfeifer
2010-06-24  7:53   ` Florian Westphal
2010-06-24 22:14     ` Hagen Paul Pfeifer [this message]
2010-06-27  4:27       ` David Miller
2010-06-27  5:00 ` 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=20100624221416.GA31116@nuttenaction \
    --to=hagen@jauu.net \
    --cc=fw@strlen.de \
    --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 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.