swift-nio/Tests
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
..
NIOConcurrencyHelpersTests Improve performance of tests (#2336) 2022-12-19 10:14:27 -08:00
NIOCoreTests Building swift-nio with Swift 5.7 for iOS using Xcode 14.0 at 2.48.0. (#2369) 2023-02-17 10:05:43 -08:00
NIODataStructuresTests Extract PriorityQueue to its own module. (#1932) 2021-08-09 11:00:03 +01:00
NIOEmbeddedTests Not Holding OnToRunClosure() test updates (#2375) 2023-02-23 11:03:03 +00:00
NIOFoundationCompatTests Add utilties for reading and writing UUIDs (#2045) 2022-10-31 06:25:28 -07:00
NIOHTTP1Tests Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
NIOPosixTests Add support for UDP_SEGMENT (#2372) 2023-02-27 13:18:58 +00:00
NIOTLSTests Clean up dependencies and imports. (#1935) 2021-08-12 13:49:46 +01:00
NIOTestUtilsTests Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
NIOTests Move NIO to NIOPosix, make NIO a shell. (#1936) 2021-08-16 16:50:40 +01:00
NIOWebSocketTests Use #fileID/#filePath instead of #file (#2306) 2022-11-03 16:43:13 +00:00
LinuxMain.swift Add a pooled recv buffer allocator (#2362) 2023-02-20 17:00:19 +00:00