All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Christoph Paasch <christoph.paasch@gmail.com>,
	Julian Anastasov <ja@ssi.bg>, Wayne Badger <badger@yahoo-inc.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Leif Hedstrom <lhedstrom@apple.com>
Subject: Re: TCP_DEFER_ACCEPT wakes up without data
Date: Sun, 7 Jun 2020 12:00:49 +0200	[thread overview]
Message-ID: <20200607100049.GM28263@breakpoint.cc> (raw)
In-Reply-To: <b520b541-9013-3095-2e3b-37ec835e4ff8@gmail.com>

Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > Sure! TCP_DEFER_ACCEPT delays the creation of the socket until data
> > has been sent by the client *or* the specified time has expired upon
> > which a last SYN/ACK is sent and if the client replies with an ACK the
> > socket will be created and presented to the accept()-call. In the
> > latter case it means that the app gets a socket that does not have any
> > data to be read - which goes against the intention of TCP_DEFER_ACCEPT
> > (man-page says: "Allow a listener to be awakened only when data
> > arrives on the socket.").
> > 
> > In the original thread the proposal was to kill the connection with a
> > TCP-RST when the specified timeout expired (after the final SYN/ACK).
> > 
> > Thus, my question in my first email whether there is a specific reason
> > to not do this.
> > 
> > API-breakage does not seem to me to be a concern here. Apps that are
> > setting DEFER_ACCEPT probably would not expect to get a socket that
> > does not have data to read.
> 
> Thanks for the summary ;)
> 
> I disagree.
> 
> A server might have two modes :
> 
> 1) A fast path, expecting data from user in a small amount of time, from peers not too far away.
> 
> 2) A slow path, for clients far away. Server can implement strategies to control number of sockets
> that have been accepted() but not yet active (no data yet received).

So we can't change DEFER_ACCEPT behaviour.
Any objections to adding TCP_DEFER_ACCEPT2 with the behaviour outlined
by Christoph?

  reply	other threads:[~2020-06-07 10:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05  0:14 TCP_DEFER_ACCEPT wakes up without data Wayne Badger
2014-06-07 15:41 ` Julian Anastasov
2014-06-11  0:57   ` Wayne Badger
2014-06-12  6:00     ` Julian Anastasov
     [not found]     ` <58a4abb51fe9411fbc7b1a58a2a6f5da@UCL-MBX03.OASIS.UCLOUVAIN.BE>
2020-06-04 23:18       ` Christoph Paasch
2020-06-05  1:27         ` Eric Dumazet
2020-06-05 14:57           ` Christoph Paasch
2020-06-05 16:48             ` Eric Dumazet
2020-06-07 10:00               ` Florian Westphal [this message]
2020-06-07 15:05                 ` Leif Hedstrom
2020-06-09 16:45                 ` Christoph Paasch
2020-06-05 19:47         ` Julian Anastasov

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=20200607100049.GM28263@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=badger@yahoo-inc.com \
    --cc=christoph.paasch@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=ja@ssi.bg \
    --cc=lhedstrom@apple.com \
    --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.