adding ADQ support to jdk
Alan Bateman
Alan.Bateman at oracle.com
Fri Mar 13 08:05:45 UTC 2020
On 12/03/2020 22:10, Ivanov, Vladimir A wrote:
>
> Dear All,
>
> Application Device Queue (ADQ) is an open technology to create
> application specific traffic queuing and steering. We would like to
> propose adding new socket option support into JDK for Java
> applications to query the NAPI_ID of the underlying device queue
> associated with its socket connection and take advantage of ADQ feature.
>
> The proposed API changes are:
>
> java.net. ServerSocket.java:
>
> public synchronized int getIncomingNapiId() throws SocketException
>
> java.net.Socket.java:
>
> public synchronized int getIncomingNapiId() throws SocketException
>
> java.net.StandardSocketOptions.java:
>
> public static final SocketOption<Integer> SO_INCOMING_NAPI_ID =
>
> new StdSocketOption<Integer>("SO_INCOMING_NAPI_ID", Integer.class);
>
> java.nio.ch.SocketAdaptor.java:
>
> public int getIncomingNapiId() throws SocketException
>
> java.nio.ch.SocketChannelImpl.java:
>
> set.add(StandardSocketOptions.SO_INCOMING_NAPI_ID);
>
> Please find the details on the ADQ feature below. We will be
> submitting a patch for community review soon. In the meantime, please
> let us know your feedback and comments.
>
>
I'm somewhat familiar with busy poll and I can see how this could be
used with an application that uses a number of Selector instances (based
on epoll). I think the right place to explore adding SO_INCOMING_NAPI_ID
is jdk.net/jdk.net.ExtendedSocketOptions. That is the place for
non-standard socket options. In jdk.net.LinuxSocketOptions then ~I
assume you could add an incomingNApiIdSupported() method that returns
true when it is supported (I assume it will depend on the kernel version).
-Alan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200313/043a07b6/attachment-0001.htm>
More information about the nio-dev
mailing list