TCP fastopen is a little-known feature for omitting part of the normal
3-way handshake. It's implemented in Linux (since ~2014), Windows
(since 2016), macOS and FreeBSD, but this implementation probably only
works on Linux. The heavy lifting is done by the kernel, and the
userspace changes needed (on Linux, at least) are very minor.
I'm mainly posting this to save the patch series. After going down a
rabbit hole testing and benchmarking this, it seems to make no
discernable difference that I can see, or any benefit must be under
the margin of error from measurement.
It's probably safe to include this feature, but on the other hand if
it doesn't do anything it seems to just add unnecessary complexity.
There is a corresponding libnbd series which also contains the
benchmark program, which I'll post in a moment.
Rich.