Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jul 2018 13:29:05 +0200
From:      Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
To:        Pieter de Goeje <pieter@degoeje.nl>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Does TCP_FASTOPEN actually work?
Message-ID:  <AE051217-6BFC-4BDA-ABE3-CB63FD1C3DBB@lurchi.franken.de>
In-Reply-To: <b85877d5-e783-6e2b-253e-3e755df28af7@degoeje.nl>
References:  <8f67a706-a650-bba2-a7dc-c25e676e1c97@degoeje.nl> <9B19385C-CBD4-4C12-9E84-E12CAAF23092@lurchi.franken.de> <b85877d5-e783-6e2b-253e-3e755df28af7@degoeje.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

> On 6. Jul 2018, at 19:50, Pieter de Goeje <pieter@degoeje.nl> wrote:
> 
> Op 2018-07-05 om 20:33 schreef Michael Tuexen:
>>> On 5. Jul 2018, at 17:23, Pieter de Goeje <pieter@degoeje.nl> wrote:
>>> 
>>> I'm trying to test this new feature, but I have trouble getting the client to actually send a cached cookie. It keeps requesting new ones and as a consequence it never sends data in the initial SYN packet. Tcpdump shows that the server correctly replies to a cookie request with a cookie.
>> Can you provide a tracefile?
> 
> See http://lux.student.utwente.nl/~pyotr/dump/tfo.pcap which was taken on the client host, by running tfo-client 3 times in quick succession.
> 
>>> 
>>> Or am I misunderstanding how it should work and is the cookie cache per-process instead of system wide?
>> No, the cache is system wide. You can use
>> https://reviews.freebsd.org/D14554
>> to see the entries.
> 
> No entries appear in the cache.
> I've verified that the kernel actually does receive the cookie by adding a printf() to tcp_input.c just before tcp_fastopen_update_cache() is called. The kernel finds the cookie and attempts to update the cache, and then it is apparently black-holed.
> 
>>> 
>>> I'm using the test programs from https://people.freebsd.org/~pkelsey/tfo-tools/ for this purpose.
>> How are you using the client and server?
> 
> On the server I run tfo-srv without arguments, on the client I run "tfo-client $host 22222" multiple times in quick succession. My expectation is that after the first run the cookie is retrieved and used.
> 
>>> 
>>> Server and client run on r335760 or later, with no changes to net.inet.tcp.fastopen except that server_enable was set to 1.
>> Is client_enable = 1?
> 
> Yes (by default).
I can confirm that there was a bug. It was unmasked by
https://svnweb.freebsd.org/changeset/base/335610
which enabled the TCP FO handling on the client side per default.

I have committed a fix in
https://svnweb.freebsd.org/changeset/base/336057

Thanks a lot for reporting the issue.

I'm aware of some other issues, but please report any issues you
find!

Best regards
Michael
> 
> - Pieter




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AE051217-6BFC-4BDA-ABE3-CB63FD1C3DBB>