Hi Alan, Here is the most recent modification of the patch. The link is available here: http://cr.openjdk.java.net/~mcberg/jdk/6432031/webrev.11/
Please let us know if everything is all right. Again, thank you very much for your help! Thanks, Lucy -----Original Message----- From: Alan Bateman [mailto:alan.bate...@oracle.com] Sent: Wednesday, February 10, 2016 10:38 AM To: Lu, Yingqi <yingqi...@intel.com>; Volker Simonis <volker.simo...@gmail.com>; Michael McMahon <michael.x.mcma...@oracle.com> Cc: net-dev@openjdk.java.net; Viswanathan, Sandhya <sandhya.viswanat...@intel.com>; Kharbas, Kishor <kishor.khar...@intel.com>; Aundhe, Shirish <shirish.aun...@intel.com>; Kaczmarek, Eric <eric.kaczma...@intel.com> Subject: Re: Patch for adding SO_REUSEPORT socket option On 05/02/2016 17:27, Lu, Yingqi wrote: > Hi Alan, > > Here is the new modification of the patch. The link is available here: > http://cr.openjdk.java.net/~mcberg/jdk/6432031/webrev.10/ > > In this version, we make supportedOptions() in AbstractPlainSocketImpl and > AbstractPlainDatagramSocketImpl return an immutable set of the socket > options. In addition, we corrected couple formatting issues. > > Please let us know your feedback and comments. > I've looked through the latest revision. Just a couple of small things: In MulticastSocket then a small typo (in two places) where you have "SO_REUSPORT" instead of "SO_REUSEPORT". Also it links to setOption(int,Object) then I assume it should be setOption(SocketOption,Object). In AbstractPlainSocketImpl and AbstractPlainDatagramSocketImpl then supportedOptions looks technically correct but there is no need to create an unmodifiableSet on each call to supportedOptions. Instead you can simply do: Set<SocketOption<?>> options = socketOptions; if (options == null) { if (isReusePortAvailable()) { options = new HashSet<>(); options.addAll(super.supportedOptions()); options.add(StandardSocketOptions.SO_REUSEPORT); options = Collections.unmodifiableSet(options); } else { options = super.supportedOptions(); } socketOptions = options; } return options; I don't see any other issues at this time and I'm happy to sponsor and help you get this in. -Alan.