adding rsockets support into JDK

Lu, Yingqi yingqi.lu at intel.com
Sat Jun 23 00:56:05 UTC 2018


Hi All,

Here is the version 7 of the patch. http://cr.openjdk.java.net/~ylu/8195160.07/

In this version, I did:

1. Added SO_LINGER supports (librdmacm supports it) to RDMA based sockets and socket channels. Tests are also updated with this newly added Socket Option.

2. Added a private static variable rdmaOptionsSet to both java.net.Socket and java.net.ServerSocket. This way, I think the supportedOptions will return correct values between RDMA based sockets and regular sockets regardless of who is created first. Please let me know if I missed any cases here.

Please review the patch and let me know your feedback.

Thanks,
Lucy

>-----Original Message-----
>From: nio-dev [mailto:nio-dev-bounces at openjdk.java.net] On Behalf Of Lu,
>Yingqi
>Sent: Thursday, June 21, 2018 12:45 PM
>To: Alan Bateman <Alan.Bateman at oracle.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
>
>Hi All,
>
>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.
>
>Thanks,
>Lucy
>
>>-----Original Message-----
>>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
>>https://bugs.openjdk.java.net/browse/JDK-8205186.
>>>
>>> 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.
>>
>>-Alan


More information about the nio-dev mailing list