adding rsockets support into JDK
yingqi.lu at intel.com
Thu Jun 21 19:44:42 UTC 2018
Here is the webrev.06 version of the patch. http://cr.openjdk.java.net/~ylu/8195160.06/
In this version, I did following changes:
1. Adding test cases for supported RDMA socket options.
2. Fixed an issue inside jdk.net.Sockets.openRdmaSocket. Previously, a new Socket is created to check the support for SO_REUSEPORT and TCP_QUICKACT. This sets the static variable optionSet in java.net.Socket. 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 java.net.Socket. When a Rdma Socket is created with RdmaSocketImpl, java.net.Socket cannot directly call jdk.net.RdmaSocketImpl.setSocket. Instead, java.net.Socketimpl.setSocket is called. Same issue with Rdma ServerSocket. Current solution is to make java.net.SocketImpl.setSocket from package private to protected and override it inside rdma.ch.RdmaSocketImpl. This causes additional API changes. I also tried to keep setSocket from java.base as package private but make rdma.ch.setSocket public and have java.net.Socket directly call it. However, this does not work for some reason. Test shows java.net.SocketImpl.setSocket 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.
>From: Alan Bateman [mailto:Alan.Bateman at oracle.com]
>Sent: Monday, June 18, 2018 11:54 PM
>To: Lu, Yingqi <yingqi.lu at intel.com>; nio-dev at openjdk.java.net
>Cc: Viswanathan, Sandhya <sandhya.viswanathan at intel.com>; Aundhe, Shirish
><shirish.aundhe at intel.com>; Kaczmarek, Eric <eric.kaczmarek at intel.com>
>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 java.net.ServerSocket (to
>match the equivalent in java.net.Socket) so that will need to be included too. This
>addition means the scope changes to Java SE too.
More information about the nio-dev