I agree with all the changes you recommend except the last one... see below. ----- Original Message ----- From: dmitry.samers...@oracle.com To: john.zavg...@oracle.com Cc: net-dev@openjdk.java.net Sent: Friday, September 14, 2012 3:08:57 PM GMT -05:00 US/Canada Eastern Subject: Re: Proposed changes for Bug 7193520
John, Changes look good for me. Few nits below. PlainDatagramSocketImpl.c 318 brackets is not necessary anymore 1644 whole #ifdef could be removed struct ip_mreqn mreqn; is not necessary anymore, 2283 the same 2294 #ifdef is not necessary anymore ------- This is the original code near line number 2294 #ifdef __linux__ mname.imr_address.s_addr = (isOldKernel ? mreqn.imr_address.s_addr : in.s_addr); #else mname.imr_interface.s_addr = in.s_addr; #endif --------------- When Linux is the OS, the structure field name to be set is "imr_address", whereas when other OSes are used, the field name is: imr_interface. Am I understanding your suggestion correctly? Thanks! John -Dmitry On 2012-09-14 22:22, John Zavgren wrote: > Greetings: > > > This bug (7193520) was filed because there are obsolete checks in the openJDK > native code that implements datagram sockets, e.g., > src/solaris/native/java/net/PlainDatagramSocketImpl.c > and it's Java counterpart: > src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java > > The native code (PlainDatagramSocketImpl.c and "friends") runs real time > checks for the Linux kernel version number. If the most significant two > fields of the version number is "2.2" on the host platform, then these checks > cause the socket to be created, used, and managed differently than if the > Linux kernel version were newer. (These behavior changes were necessary > because Linux kernel 2.2.X > IP networking was was implemented differently and lacked features of the > newer kernels.) > > However, the run time logic isn't actually needed anymore because openJDK > doesn't support Linux kernel 2.2.X, and consequently one cannot run openJDK > on these older OSes. The run time checks are never used. > > The proposed changes to the code > (http://cr.openjdk.java.net/~chegar/7193520/webrev.00/) eliminate distracting > dead wood, and it makes it run (slightly) faster, because the run time checks > are eliminated. > > > Thanks! > and > RSVP > John Zavgren > john.zavg...@oracle.com > > > > -- Dmitry Samersoff Java Hotspot development team, SPB04 * There will come soft rains ...