public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Yuchung Cheng <ycheng@google.com>
Cc: Vincent Li <vincent.mc.li@gmail.com>, netdev@vger.kernel.org
Subject: Re: Piggyback the final ACK of the three way TCP connection establishment with the data
Date: Fri, 23 Mar 2012 12:11:12 -0700	[thread overview]
Message-ID: <1332529872.2516.5.camel@edumazet-glaptop> (raw)
In-Reply-To: <CAK6E8=dnYBLQm4eDh4HOeN_O8uRy8Gvf=PeuT69+6rycjRwRfg@mail.gmail.com>

On Fri, 2012-03-23 at 12:03 -0700, Yuchung Cheng wrote:

> AFAICT the feature that Eric refers to is TCP Fast Open that I am
> still testing and have not yet submit to netdev.
> 

Nope, I was referring to actual linux code ;)

TFO will permit to send the DATA in the SYN packet, while Vincent only
asked to send it in the second packet the client sends to server.

> But one way to achieve that currently is doing a non-blocking connect
> then a blocking write.
> 
> I just tried this on 2.6 machine to a remote server
> 
> fcntl(sd, F_SETFL, fcntl(sd, F_GETFL, 0) | O_NONBLOCK);
> connect(sd, ...);
> fcntl(sd, F_SETFL, fcntl(sd, F_GETFL, 0) & ~O_NONBLOCK);
> sendto(sd, buf, buf, 0, ...);
> 
> The key is that the socket has to be in progress of connecting
> when application calls write/sendto(2). If you are testing on loopback,
> the connect might finish before sendto so this won't work.
> 

  reply	other threads:[~2012-03-23 19:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 23:38 Piggyback the final ACK of the three way TCP connection establishment with the data Vincent Li
2012-03-21 23:52 ` Rick Jones
2012-03-22  0:00 ` Eric Dumazet
2012-03-22 23:02   ` Vincent Li
2012-03-22 23:07     ` David Miller
2012-03-22 23:13     ` Eric Dumazet
2012-03-22 23:17       ` Eric Dumazet
2012-03-23 15:38         ` Vincent Li
2012-03-23 19:03           ` Yuchung Cheng
2012-03-23 19:11             ` Eric Dumazet [this message]
2012-03-22 23:44     ` Rick Jones

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=1332529872.2516.5.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vincent.mc.li@gmail.com \
    --cc=ycheng@google.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