RFR 15 8243099: SO_INCOMING_NAPI_ID support

Viswanathan, Sandhya sandhya.viswanathan at intel.com
Tue May 5 20:26:35 UTC 2020


Thanks Alan. Chris, please let me know if you are ok with Javadoc as well. I will then proceed with CSR immediately.

Best Regards,
Sandhya


-----Original Message-----
From: net-dev <net-dev-bounces at openjdk.java.net> On Behalf Of Alan Bateman
Sent: Tuesday, May 05, 2020 12:24 PM
To: Ivanov, Vladimir A <vladimir.a.ivanov at intel.com>; OpenJDK Network Dev list <net-dev at openjdk.java.net>
Subject: Re: RFR 15 8243099: SO_INCOMING_NAPI_ID support

On 05/05/2020 19:04, Ivanov, Vladimir A wrote:
> Thanks for your review.
> yes, the SocketException looks better here than the IOE. The updated 
> webrev available as 
> http://cr.openjdk.java.net/~sviswanathan/Vladimir/8243099/webrev.08/
>
> Also 'positive' was added to Javadoc to describe napi id.
Thanks. the javadoc looks good. I think Chris is looking at the API docs too. Next step is the CSR, I assume Sandhya will do that for you.

One question that goes back to one of my original questions is whether this socket option is supported for listener sockets (ServerSocketChannel and ServerSocket). I just checked it locally and SO_INCOMING_NAPI_ID is always reported as 0. I get a positive value for connected sockets as expected.


>
> Could you describe the testing scenario that should be covered?
> Now this test have:
>   - simple check (zero for non-initialized and exception for 'set' option for the ServerSocket/Socket/DatagramSocket).
>   - server/client testing for the ServerSocket/Socket;
>   - send/receive testing for the DatagramSocket.
>
> The simple check may be easily extended to channels. The server/client testing require special classes that increase the testing size and reduce maintainability.
I think the tests can be simple, no need for server/client in different threads. When SO_INCOMING_NAPI_ID is supported then all you need to do is check it is 0 before any packets are received and then a constant positive value thereafter.  It's important that tests don't use a hardcoded port and also important that tests clean up (don't leave any sockets open).

-Alan


More information about the net-dev mailing list