News for hackers. Stuff that matters.
Re:QUIC is now RFC 9000 by jeltz on Friday May 28, 2021 @12:25AM (#27311714)
Why can't QUIC be implemented in the Kernel? Just because something can be implemented in user space does not mean that it has to.
Re:QUIC is now RFC 9000 by throwawaaarrgh on Friday May 28, 2021 @12:45AM (#27311819)
Anything can be implemented in a kernel. But unless it's natively supported in other kernels, networks, and systems, that just means that one kernel is easier to work with.

The big idea behind TCP/IP is that it's a stack which you can use anywhere and everywhere. Not just any network, but any host. To do that, you need it to be portable and ubiquitous. And there is no protocol above OSI layer 4 that is ubiquitous. By nature of being above UDP, QUIC is layer 5 or higher. And it's got more features than other protocols do, meaning it needs more functions.

So not only is it unlikely that it'll be supported like the layer 4 protocols, it's unlikely to be supported by the Berkeley/POSIX sockets API, the one portable network interface specification for every operating system. One solution to all this would be to make QUIC a layer 4 protocol and update the sockets API. But nobody wants to do this because it's hard.

So, we could just have everyone add a layer 5 protocol to their stack, implement it in kernels, NICs, routers, etc, update the sockets API, and wait a few years for adoption. But will that happen? Or will the industry just go "let userspace handle it" like with TLS?

Re:QUIC is now RFC 9000 by jeltz on Friday May 28, 2021 @12:56AM (#27311870)
I really do not see how the layers matter. They are just an artificial categorization. E.g. SCTP is both a layer 4 protocol and a layer 5 protocol (SCTP-over-UDP) and as far as I can tell from some quick googling at least both Linux and FreeBSD implement both in their kernels. What matters is if various libcs add QUIC or not.

And the Linux kernel implements other layer 5 protcols like WireGuard.

Re:QUIC is now RFC 9000 by Orphis on Friday May 28, 2021 @10:02AM (#27315422)
SCTP can also be run over DTLS over ICE over UDP. How many layers is that?!
Re:QUIC is now RFC 9000 by alblue on Friday May 28, 2021 @03:54AM (#27312791)
> The big idea behind TCP/IP is that it's a stack which you can use anywhere and everywhere

For what its worth, Windows 3.x did not come with a TCP/IP stack installed; it was an optional extra. (In the days before Windows 3.x you had to pay for the TCP/IP stack from your network card vendor as an optional extra.)

It wasn’t until Win95 that the OS came bundled with TCP/IP by default, and you could still install other networking protocols like Novel Netware or AppleTalk.

TCP/IP didn’t become the default stack until late into the ‘90s and the “everywhere by default” wasn’t really true until just before the turn of the millennium.

So while QUIC might be in the “early adopters” space for now, everything started that way once. I have no doubt that by 2030 we will see QUIC as a kernel feature in many major operating systems.

Re:QUIC is now RFC 9000 by Narishma on Friday May 28, 2021 @09:06AM (#27314889)
I think some versions of Windows 3.x did come with a TCP/IP stack, though it wasn't installed by default even with networking. You had to explicitly install it.
Re:QUIC is now RFC 9000 by lovemenot on Friday May 28, 2021 @10:23AM (#27315649)
windows for workgroups 3.11

iirc

Re:QUIC is now RFC 9000 by anticensor on Friday May 28, 2021 @02:03AM (#27312198)
> By nature of being above UDP, QUIC is layer 5 or higher.

QUIC could also be encapsulated into IP without UDP, with a small modification: always use the framed mode. Hence it is actually a layer 4 protocol.

Re:QUIC is now RFC 9000 by lxgr on Friday May 28, 2021 @02:23AM (#27312316)
> By nature of being above UDP, QUIC is layer 5 or higher.

That doesn't seem like a fair characterization. In some TLS-based VPNs, IP is sent over TLS – does that make it a layer 7 protocol?

Re:QUIC is now RFC 9000 by dzamo_norton on Sunday May 30, 2021 @01:43AM (#27330895)
This is a tunneled scenario. By definition, you cannot not sensibly use it draw conclusions about network layers.
Re:QUIC is now RFC 9000 by lxgr on Sunday May 30, 2021 @12:04PM (#27334179)
Would it be very wrong to consider QUIC a new type of layer 4 protocol encapsulated in another one (UDP) for compatibility with NATs and other middle boxes?

SCTP is also usually encapsulated in UDP when used in WebRTC data channels, yet I've never heard it being described as anything other than a transport layer protocol.

Re:QUIC is now RFC 9000 by skissane on Friday May 28, 2021 @02:18AM (#27312289)
> it's unlikely to be supported by the Berkeley/POSIX sockets API, the one portable network interface specification for every operating system. One solution to all this would be to make QUIC a layer 4 protocol and update the sockets API. But nobody wants to do this because it's hard.

I can't see why a user-space library couldn't hook the Berkeley sockets API calls and redirect them to a user-space implementation for IPPROTO_QUIC sockets. You may need to use some trick to distinguish native kernel sockets from user-space-implemented ones. (e.g. if you know the kernel only allocates FDs in a given range, use numbers outside that range to identify your user-space-implemented sockets). Someone could add a framework for doing this to the C library.

Actually I believe Windows has a built-in facility for doing this. To implement a new transport protocol in Winsock, you need to provide a transport provider DLL. Normally you'll also have a kernel-mode device driver, which the transport provider DLL calls, and the meat of the protocol implementation will be in that kernel-mode device driver not in the transport provider DLL. But I don't think it has to be that way – I don't believe there is anything stopping a Winsock transport provider from being written entirely in user-space.

Re:QUIC is now RFC 9000 by slowstart on Friday May 28, 2021 @12:37PM (#27317514)
Our QUIC implementation MsQuic can run in both kernel and user mode on Windows. A PAL allows the core protocol logic to be agnostic.