RFR: 8305089: Implement missing socket options on AIX [v3]

Daniel Jeliński djelinski at openjdk.org
Wed Apr 5 12:36:13 UTC 2023


On Wed, 5 Apr 2023 12:23:10 GMT, Varada M <duke at openjdk.org> wrote:

>> Breaking this into two parts : 
>> 
>> 1. Implementing socket options for AIX 
>> 2. DontFragmentTest failure 
>> 
>> - Implementing socket options for AIX :
>> 
>> Unlike the linux, windows and macOS, AIX uses the default implementation for socket options such as ipDontFragmentSupported(), keepAliveOptionsSupported(), setTcpkeepAliveProbes, getTcpkeepAliveProbes, setQuickAck, getQuickAck and more, where it either returns false or exception. These options can be implemented on AIX with the supported flags like SO_PEERID, TCP_NODELAYACK is the equivalent AIX option for TCP_QUICKACK and IPPROTO_TCP, IP_DONTFRAG. 
>> 
>> - DontFragment test failure :
>> 
>> DontFragmentTest.java fails with a runtime exception : “IP_DONTFRAGMENT should be supported” because the supportOptions doesn’t contain IP_DONTFRAGMENT flag.
>> 
>> Reported Issue :  [JDK-8305089](https://bugs.openjdk.org/browse/JDK-8305089)
>
> Varada M has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Updated copyright year

Hi, could you check if the value returned by [Java_sun_nio_ch_Net_shouldSetBothIPv4AndIPv6Options0](https://github.com/openjdk/jdk/blob/0deb648985b018653ccdaf193dc13b3cf21c088a/src/java.base/unix/native/libnio/ch/Net.c#L159-L167) is correct on AIX?

More specifically, this piece of code should throw an exception mentioning that the message is too big for the underlying transport:

DatagramChannel channel = DatagramChannel.open(StandardProtocolFamily.INET6);
channel.setOption(ExtendedSocketOptions.IP_DONTFRAGMENT, true);
channel.send(ByteBuffer.allocate(64000),
                    new InetSocketAddress("bugs.openjdk.org", 1234));

on Windows and Linux it works (i.e. throws) because `shouldSetBothIPv4AndIPv6Options0` returns `true`; on MacOSX it doesn't work even if `shouldSetBothIPv4AndIPv6Options0` returns `true`, so we return `false`; it would be interesting how AIX behaves here.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13240#issuecomment-1497413476



More information about the build-dev mailing list