swift-nio/Tests/NIOPosixTests
George Barnett 19b878f461
Add support for UDP_SEGMENT (#2372)
Motivation:

On Linux, the UDP_SEGMENT socket option allows for large buffers to be
written to the kernel and segmented by the kernel (or in some cases the
NIC) into smaller datagrams. This can substantially decrease the number
of syscalls.

This can be set on a per message basis on a per socket basis. This
change adds per socket configuration.

Modifications:

- Add a CNIOLinux function to check whether UDP_SEGMENT is supported on
  that particular Linux.
- Add a helper to `System` to check whether UDP_SEGMENT is supported on
  the current platform.
- On Linux only:
  - add the udp socket option level
  - add the udp_segment socket option
- Add the `DatagramSegmentSize` channel option.
- Get/Set the option in `DatagramChannel`

Results:

UDP GSO is supported on Linux.

Co-authored-by: Cory Benfield <lukasa@apple.com>
2023-02-27 13:18:58 +00:00
..
AcceptBackoffHandlerTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
AcceptBackoffHandlerTest.swift Deprecate `NIOAtomics` in favor of `Atomics` (#2204) 2022-07-01 02:31:14 -07:00
BlockingIOThreadPoolTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
BlockingIOThreadPoolTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
BootstrapTest+XCTest.swift Remove not on eventLoop precondition for NIOPipeBootstrap (#1977) 2021-10-18 13:02:07 +01:00
BootstrapTest.swift Add `NIOBSDSocket.ProtocolSubtype` (#2317) 2022-11-22 06:01:52 -08:00
ChannelNotificationTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
ChannelNotificationTest.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
ChannelPipelineTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
ChannelPipelineTest.swift Define `Array` element type explicitly to fix nightly CI (#2250) 2022-08-24 17:48:42 +01:00
ChannelTests+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
ChannelTests.swift Pool buffers for ivecs and storage refs in the event loop. (#2358) 2023-02-07 13:48:26 +00:00
CodecTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
CodecTest.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
ControlMessageTests+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
ControlMessageTests.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
DatagramChannelTests+XCTest.swift Add support for UDP_SEGMENT (#2372) 2023-02-27 13:18:58 +00:00
DatagramChannelTests.swift Add support for UDP_SEGMENT (#2372) 2023-02-27 13:18:58 +00:00
EchoServerClientTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
EchoServerClientTest.swift Deprecate `NIOAtomics` in favor of `Atomics` (#2204) 2022-07-01 02:31:14 -07:00
EventLoopFutureTest+XCTest.swift ELF: provide flatMapWithEventLoop and friends (#1996) (#2049) 2022-02-17 10:08:04 -08:00
EventLoopFutureTest.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
EventLoopTest+XCTest.swift Don't retain a task when all we want is a time (#2373) 2023-02-20 07:27:58 -08:00
EventLoopTest.swift Not Holding OnToRunClosure() test updates (#2375) 2023-02-23 11:03:03 +00:00
FileRegionTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
FileRegionTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
GetAddrInfoResolverTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
GetAddrInfoResolverTest.swift NIOPosix: use internal enumeration for GAI resolver (#2177) 2022-06-09 08:21:24 +01:00
HappyEyeballsTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
HappyEyeballsTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
IPv4Header.swift Fix non Darwin/Linux builds (#2328) 2022-12-02 08:48:54 -08:00
IdleStateHandlerTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
IdleStateHandlerTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
IntegerBitPackingTests+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
IntegerBitPackingTests.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
MulticastTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
MulticastTest.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
NIOThreadPoolTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
NIOThreadPoolTest.swift rename class Lock to struct NIOLock (#2266) 2022-09-21 07:36:42 -07:00
NonBlockingFileIOTest+XCTest.swift cap read+pread POSIX read sizes at Int32.max (#2323) 2022-11-28 13:19:12 +00:00
NonBlockingFileIOTest.swift cap read+pread POSIX read sizes at Int32.max (#2323) 2022-11-28 13:19:12 +00:00
PendingDatagramWritesManagerTests+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
PendingDatagramWritesManagerTests.swift Pool buffers for ivecs and storage refs in the event loop. (#2358) 2023-02-07 13:48:26 +00:00
PipeChannelTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
PipeChannelTest.swift Add `NIOBSDSocket.ProtocolSubtype` (#2317) 2022-11-22 06:01:52 -08:00
PooledRecvBufferAllocatorTests+XCTest.swift Add a pooled recv buffer allocator (#2362) 2023-02-20 17:00:19 +00:00
PooledRecvBufferAllocatorTests.swift Add a pooled recv buffer allocator (#2362) 2023-02-20 17:00:19 +00:00
RawSocketBootstrapTests+XCTest.swift Add `RawSocketBootstrap` (#2320) 2022-12-01 15:35:04 +01:00
RawSocketBootstrapTests.swift Add `RawSocketBootstrap` (#2320) 2022-12-01 15:35:04 +01:00
SALChannelTests+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
SALChannelTests.swift Deprecate `NIOAtomics` in favor of `Atomics` (#2204) 2022-07-01 02:31:14 -07:00
SALEventLoopTests+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
SALEventLoopTests.swift Fix testSchedulingTaskOnSleepingLoopWakesUpOnce (#1992) 2021-11-25 10:04:25 +00:00
SelectorTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
SelectorTest.swift Add `NIOBSDSocket.ProtocolSubtype` (#2317) 2022-11-22 06:01:52 -08:00
SocketAddressTest+XCTest.swift Add support for translating subnet prefixes to masks (#2169) 2022-06-07 04:49:19 -07:00
SocketAddressTest.swift Fix Nightly Build to work with new Swift versions (#2288) 2022-10-13 14:29:40 +01:00
SocketChannelTest+XCTest.swift MPTCP support on Linux (#2308) 2022-11-09 11:02:45 +00:00
SocketChannelTest.swift Fix failing build on MacOS (#2313) 2022-11-15 01:25:35 -08:00
SocketOptionProviderTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
SocketOptionProviderTest.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
StreamChannelsTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
StreamChannelsTest.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
SyscallAbstractionLayer.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
SystemCallWrapperHelpers.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
SystemTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
SystemTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
TestUtils.swift Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
ThreadTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
ThreadTest.swift rename class Lock to struct NIOLock (#2266) 2022-09-21 07:36:42 -07:00
UniversalBootstrapSupportTest+XCTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
UniversalBootstrapSupportTest.swift Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00