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

Reply via email to