[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1332529872.2516.5.camel@edumazet-glaptop>
Date: Fri, 23 Mar 2012 12:11:12 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Yuchung Cheng <ycheng@...gle.com>
Cc: Vincent Li <vincent.mc.li@...il.com>, netdev@...r.kernel.org
Subject: Re: Piggyback the final ACK of the three way TCP connection
establishment with the data
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.
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists