New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for RFC7413 on linux for server sockets #4196

Closed
wants to merge 1 commit into
base: 4.0
from

Conversation

Projects
None yet
3 participants
@serioussam
Contributor

serioussam commented Sep 4, 2015

Motivation:

TCP Fast Open allows data to be carried in the SYN and SYN-ACK packets and consumed by the receiving end during the initial connection handshake, and saves up to one full round-trip time (RTT) compared to the standard TCP, which requires a three-way handshake (3WHS) to complete before data can be exchanged. This commit enables support for TFO on server sockets.

Modifications:

Added new Integer Option TCP_FASTOPEN in EpollChannelOption.
Added getters/setters in EpollServerChannelConfig for TCP_FASTOPEN.
Added way to check if TCP_FASTOPEN is supported on server in Native.
Added setting on socket opt TCP_FASTOPEN if value is set on channel options in doBind in EpollServerSocketChannel.
Enhanced EpollSocketTestPermutation to contain a permutation for server socket containing fast open.

Result:

Users of native-epoll can set TCP_FASTOPEN on server sockets and thus leverage fast connect features of RFC7413 if client is capable of it.

@normanmaurer normanmaurer self-assigned this Sep 5, 2015

@normanmaurer normanmaurer added this to the 4.0.32.Final milestone Sep 5, 2015

@normanmaurer normanmaurer added the feature label Sep 5, 2015

@normanmaurer

This comment has been minimized.

Show comment
Hide comment
@normanmaurer

normanmaurer Sep 5, 2015

Member

@serioussam awesome... let me check

Member

normanmaurer commented Sep 5, 2015

@serioussam awesome... let me check

@normanmaurer

View changes

Show outdated Hide outdated transport-native-epoll/src/main/c/io_netty_channel_epoll_Native.c Outdated
@normanmaurer

View changes

Show outdated Hide outdated transport-native-epoll/src/main/c/io_netty_channel_epoll_Native.c Outdated
@normanmaurer

View changes

Show outdated Hide outdated transport-native-epoll/src/main/c/io_netty_channel_epoll_Native.c Outdated
@normanmaurer

View changes

Show outdated Hide outdated transport-native-epoll/src/main/c/io_netty_channel_epoll_Native.c Outdated
@normanmaurer

View changes

Show outdated Hide outdated transport-native-epoll/src/main/c/io_netty_channel_epoll_Native.c Outdated
@normanmaurer

View changes

Show outdated Hide outdated transport-native-epoll/src/main/c/io_netty_channel_epoll_Native.c Outdated
@normanmaurer

View changes

Show outdated Hide outdated transport-native-epoll/src/main/c/io_netty_channel_epoll_Native.c Outdated
@normanmaurer

View changes

Show outdated Hide outdated transport-native-epoll/src/main/c/io_netty_channel_epoll_Native.h Outdated
@normanmaurer

View changes

Show outdated Hide outdated ...epoll/src/main/java/io/netty/channel/epoll/EpollServerChannelConfig.java Outdated
@normanmaurer

View changes

Show outdated Hide outdated ...oll/src/test/java/io/netty/channel/epoll/EpollSocketTestPermutation.java Outdated
@normanmaurer

This comment has been minimized.

Show comment
Hide comment
@normanmaurer

normanmaurer Sep 5, 2015

Member

@serioussam please address my comments and ping me once done

Member

normanmaurer commented Sep 5, 2015

@serioussam please address my comments and ping me once done

@serioussam

This comment has been minimized.

Show comment
Hide comment
@serioussam

serioussam Sep 6, 2015

Contributor

@normanmaurer sure thing, I am travelling right now. I will address it once back in couple of days.

Contributor

serioussam commented Sep 6, 2015

@normanmaurer sure thing, I am travelling right now. I will address it once back in couple of days.

@normanmaurer

View changes

Show outdated Hide outdated transport-native-epoll/src/main/c/io_netty_channel_epoll_Native.c Outdated
@normanmaurer

View changes

Show outdated Hide outdated transport-native-epoll/src/main/c/io_netty_channel_epoll_Native.c Outdated
@serioussam

This comment has been minimized.

Show comment
Hide comment
@serioussam

serioussam Sep 8, 2015

Contributor

@normanmaurer all corrections done. Please have a look.

Contributor

serioussam commented Sep 8, 2015

@normanmaurer all corrections done. Please have a look.

@normanmaurer

View changes

Show outdated Hide outdated transport-native-epoll/src/main/c/io_netty_channel_epoll_Native.c Outdated
@normanmaurer

This comment has been minimized.

Show comment
Hide comment
@normanmaurer

normanmaurer Sep 8, 2015

Member

@serioussam just one nit to address... after that please squash your commits and after that I will cherry-pick

Member

normanmaurer commented Sep 8, 2015

@serioussam just one nit to address... after that please squash your commits and after that I will cherry-pick

@normanmaurer

This comment has been minimized.

Show comment
Hide comment
@normanmaurer

normanmaurer Sep 8, 2015

Member

@serioussam just squash and I'm happy :)

Member

normanmaurer commented Sep 8, 2015

@serioussam just squash and I'm happy :)

Add support for RFC7413 on linux for server sockets
Motivation:

TCP Fast Open allows data to be carried in the SYN and SYN-ACK packets and consumed by the receiving end during the initial connection handshake, and saves up to one full round-trip time (RTT) compared to the standard TCP, which requires a three-way handshake (3WHS) to complete before data can be exchanged. This commit enables support for TFO on server sockets.

Modifications:

Added new Integer Option TCP_FASTOPEN in EpollChannelOption.
Added getters/setters in EpollServerChannelConfig for TCP_FASTOPEN.
Added way to check if TCP_FASTOPEN is supported on server in Native.
Added setting on socket opt TCP_FASTOPEN if value is set on channel options in doBind in EpollServerSocketChannel.
Enhanced EpollSocketTestPermutation to contain a permutation for server socket containing fast open.

Result:

Users of native-epoll can set TCP_FASTOPEN on server sockets and thus leverage fast connect features of RFC7413 if client is capable of it.
@netkins

This comment has been minimized.

Show comment
Hide comment
@netkins

netkins Sep 8, 2015

TeamCity pull requests :: netty Build 190 is now running

netkins commented on e89552b Sep 8, 2015

TeamCity pull requests :: netty Build 190 is now running

This comment has been minimized.

Show comment
Hide comment
@netkins

netkins Sep 8, 2015

TeamCity pull requests :: netty Build 190 outcome was SUCCESS
Summary: Tests passed: 4765, ignored: 21 Build time: 00:29:41

netkins replied Sep 8, 2015

TeamCity pull requests :: netty Build 190 outcome was SUCCESS
Summary: Tests passed: 4765, ignored: 21 Build time: 00:29:41

@serioussam

This comment has been minimized.

Show comment
Hide comment
@serioussam

serioussam Sep 8, 2015

Contributor

@normanmaurer squashed :).

Contributor

serioussam commented Sep 8, 2015

@normanmaurer squashed :).

@normanmaurer

This comment has been minimized.

Show comment
Hide comment
@normanmaurer

normanmaurer Sep 9, 2015

Member

@serioussam thanks!

Cherry-picked into 4.0 (24860e7) , 4.1 (250a09d) and master (c449cea)

Member

normanmaurer commented Sep 9, 2015

@serioussam thanks!

Cherry-picked into 4.0 (24860e7) , 4.1 (250a09d) and master (c449cea)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment