adding rsockets support into JDK

Lu, Yingqi yingqi.lu at intel.com
Tue Dec 4 01:25:58 UTC 2018


Hi All,

Here is the link to the version 23 of the patch: http://cr.openjdk.java.net/~ylu/8195160.23/

In this version, I did following items:

1. Further cleaned up the patch. I merged LinuxRdmaSocketImpl into RdmaSocketImpl and modified the native code accordingly

2. ioctl with FIONREAD is not implemented with rsocket, I changed RdmaSocketInputStream.available() returns UOE

3. dup2 system call is also not available with rsocket. I checked with Linux rdma kernel developer regarding to what happens when there is data remaining on the rsocket during close. The response I got is rsocket would send out the remaining data before being closed. Based on this information, I simply removed useDeferredClose flag for close call in RdmaSocketImpl.

Please review and let me know your feedback and comments.

Thanks,
Lucy

>-----Original Message-----
>From: nio-dev [mailto:nio-dev-bounces at openjdk.java.net] On Behalf Of Lu,
>Yingqi
>Sent: Sunday, December 2, 2018 9:49 PM
>To: Alan Bateman <Alan.Bateman at oracle.com>
>Cc: Viswanathan, Sandhya <sandhya.viswanathan at intel.com>; nio-
>dev at openjdk.java.net; Aundhe, Shirish <shirish.aundhe at intel.com>;
>Kaczmarek, Eric <eric.kaczmarek at intel.com>
>Subject: RE: adding rsockets support into JDK
>
>Hi Alan,
>
>Please find version 22 of the patch is available at
>http://cr.openjdk.java.net/~ylu/8195160.22
>
>The updated Javadoc is available at
>http://cr.openjdk.java.net/~ylu/rsocket_docs/api/jdk.net/jdk/net/package-
>summary.html
>
>Same Javadoc zip file has also been updated in the CSR at
>https://bugs.openjdk.java.net/browse/JDK-8205186
>
>In this version, I have changed following items:
>
>1. In the class description of RdmaSockets.java, I changed UOE to
>UnsupportedOperationException, in addition, I added the Javadoc link for
>openXXX methods
>
>2. Made RdmaPollSelectorProvider directly extends SelectorProvider
>
>3. Merged LinuxRdmaPollSelectorProvider with Linux version of
>RdmaPollSelectorProvider since they are both only available to Linux Platform
>
>4. Similar to 3, I merged LinuxRdmaSocketDispatcher with
>RdmaSocketDispatcher
>
>5. Removed os.name check in RdmaSocketImpl.java as well since the code is
>only available to Linux platform
>
>Thanks,
>Lucy
>
>>-----Original Message-----
>>From: Alan Bateman [mailto:Alan.Bateman at oracle.com]
>>Sent: Sunday, December 2, 2018 8:12 AM
>>To: Lu, Yingqi <yingqi.lu at intel.com>
>>Cc: Aundhe, Shirish <shirish.aundhe at intel.com>; Viswanathan, Sandhya
>><sandhya.viswanathan at intel.com>; nio-dev at openjdk.java.net; Kaczmarek,
>>Eric <eric.kaczmarek at intel.com>
>>Subject: Re: adding rsockets support into JDK
>>
>>Lucy,
>>
>>I checked the CSR and it looks good but in the class description it has
>>the wording that we discussed in mail:
>>
>>"The selector provider does not support datagram channels and pipes.
>>The The openDatagramChannel and openPipe methods throw UOE."
>>
>>I assume you meant to change "UOE" to "UnsupportedOperationException",
>>and I think we can link the openXXX methods to their javadoc.
>>
>>For the implementation then it looks like RmdaPollSelectorProvider
>>extends SelectorProviderImpl without overriding these openXXX methods.
>>This means it will create instances of DatagramChannelImpl and PipeImpl
>>associated with the RDMA provider which isn't right. It might be
>>simpler to just extend SelectorProvider and that will force you to
>>override the abstract methods.
>>
>>While looking into that I see that the Linux version of
>>RdmaPollSelectorProvider is still checking the value of os.name. It
>>doesn't need to do that now and probably left over from an early iteration.
>>
>>-Alan



More information about the nio-dev mailing list