adding rsockets support into JDK

Lu, Yingqi at
Thu Jun 21 19:44:42 UTC 2018

Hi All,

Here is the webrev.06 version of the patch.

In this version, I did following changes:

1. Adding test cases for supported RDMA socket options.

2. Fixed an issue inside Previously, a new Socket is created to check the support for SO_REUSEPORT and TCP_QUICKACT. This sets the static variable optionSet in Later, when RdmaSocket is created, the TCP supportedOptions will be returned instead of RDMA socket supportedOptions.  To solve this, I reset optionSet variable to FALSE when creating the RdmaSocket

3. Fixed an issue inside When a Rdma Socket is created with RdmaSocketImpl, cannot directly call Instead, is called. Same issue with Rdma ServerSocket. Current solution is to make from package private to protected and override it inside This causes additional API changes. I also tried to keep setSocket from java.base as package private but make public and have directly call it. However, this does not work for some reason. Test shows being called instead. If you have any suggestions on this item, please let me know! 

4. Set the value limit for SO_SNDBUF and SO_RCVBUF due to RDMA sockets are not using kernel limits.

5. Throw UOE when setting SO_SNDBUF, SO_RCVBUF and SO_REUSEADDR after bind and connect.

Please review the patch and let me know your feedback.


>-----Original Message-----
>From: Alan Bateman [mailto:Alan.Bateman at]
>Sent: Monday, June 18, 2018 11:54 PM
>To: Lu, Yingqi < at>; nio-dev at
>Cc: Viswanathan, Sandhya <sandhya.viswanathan at>; Aundhe, Shirish
><shirish.aundhe at>; Kaczmarek, Eric <eric.kaczmarek at>
>Subject: Re: adding rsockets support into JDK
>On 18/06/2018 22:19, Lu, Yingqi wrote:
>> Hi All,
>> I just created a CSR at the meantime. The link is available at
>> Please review this and let me know your feedback.
>The CSR will need to include the javadoc for each of the methods. That isn't fully
>fleshed out in the webrev yet. Do you need help on this?
>The other thing is that adds a protected constructor to (to
>match the equivalent in so that will need to be included too. This
>addition means the scope changes to Java SE too.

More information about the nio-dev mailing list