Conversation
zonyitoo
commented
Aug 24, 2022
- Supported platforms: Linux-like, FreeBSD, macOS, Windows
- ref Support TCP Fast Open #49
- Supported platforms: Linux-like, FreeBSD, macOS, Windows - ref rust-lang#49
Thomasdezeeuw
left a comment
There was a problem hiding this comment.
Can you add a smoke test for this?
If I call this with the value 5, does this work on non-Linux? I.e. enable it, or would it error and would users have to do if linux { 5 } else { 1 }? Depending on the answer can you also add a test for this?
We have the answer, |
Test failed on FreeBSD CI. It seems that TFO is not enabled on CI's OS. |
|
@Thomasdezeeuw Should I remove FreeBSD support? |
|
Can you change the method so that For FreeBSD can you try add a new step to enable_tcp_fastopen:
- sysctl net.inet.tcp.fastopen.client_enabled=1
- sysctl net.inet.tcp.fastopen.server_enabled=1After |
Co-authored-by: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
Co-authored-by: Thomas de Zeeuw <thomasdezeeuw@gmail.com>
|
Still not working on FreeBSD's CI test. |
|
@zonyitoo I'll work on FreeBSD |
|
@zonyitoo the - - sysctl net.inet.tcp.fastopen.client_enabled=1
- - sysctl net.inet.tcp.fastopen.server_enabled=1
+ - sudo sysctl net.inet.tcp.fastopen.client_enable=1
+ - sudo sysctl net.inet.tcp.fastopen.server_enable=1However that doesn't seem to fix the problem (see my next comment). |
|
@asomers maybe you can help here. I got this to work on FreeBSD (the |
|
@Thomasdezeeuw this socket option is a flag, so you should only interpret it as either zero or non-zero. TCP_NODELAY is similar, and I see that socket2 interprets it correctly. I suggest you change the |
Thanks. That makes the API a little awkward as the value on Linux is the accept queue length, so we'll need to rethink the API. |
|
Updates? |
|
Just resolved conflicts with the master branch. Please review again @Thomasdezeeuw |
It seems that |