A change implementing the QUIC protocol (Quick UDP Internet Connections, RFC 9000) in the kernel has been accepted into the net-next branch, where changes are accumulated for inclusion in the upcoming Linux 7.5 kernel release. Applications will be able to establish connections and transfer data over QUIC using a client-server network socket API. As with TCP and SCTP, it uses functions such as socket, bind, connect, accept, sendmsg, recvmsg, and close. Red Hat is leading the project to integrate QUIC into the kernel.
QUIC is a layer built on top of UDP that supports multiplexing multiple connections and provides encryption equivalent to TLS/SSL. Google created the protocol in 2013 as an alternative to TCP+TLS for the web. It addresses the long connection setup and negotiation times associated with TCP and eliminates delays caused by packet loss during data transfer. QUIC is used as the transport for HTTP/3. The kernel implementation introduces a new IPPROTO_QUIC socket type that operates over UDP tunnels.
QUIC protocol logic is implemented in the kernel, except for the TLS encrypted connection negotiation stage, which runs in user space and is handled by a separate background process, tlshd, that uses the GnuTLS cryptographic library. The kernel communicates with the background process using Netlink. A single QUIC connection can be multiplexed across different user-space processes, with traffic separated using the TLS ALPN (Application-Layer Protocol Negotiation) extension.

Integrating QUIC into the kernel is expected to improve performance compared with user-space implementations. Processing all control messages in the kernel avoids context switches and system calls, and can eliminate unnecessary copying of data between buffers through zero-copy mechanisms such as sendfile(). The implementation can also take advantage of hardware acceleration for cryptographic operations.
Kernel-level support for QUIC will also make it possible to integrate this protocol into other kernel subsystems, such as SMB and NFS, with minimal changes (once connection negotiation is complete, data is exchanged through the kernel’s standard transport interfaces). Patches enabling the Linux kernel’s QUIC implementation have been prepared for Samba (for both client and server server), Curl, httpd-portable, and NetPerfMeter.
Source: opennet.ru
