quiche icon indicating copy to clipboard operation
quiche copied to clipboard

Add `dgram` crate

Open evanrittenhouse opened this issue 1 year ago • 0 comments

Overview

This PR adds a new crate for abstracting away UDP socket syscalls. It currently only contains implementations for Unix systems, but we can add multi-platform support when required. Async variants are provided with the async feature

Tasks

  • [x] Rerun tests one final time hitting relevant server(s)
  • [x] Ensure build works on non-Linux (e.g. import errors in syscalls). I ended up just making the vast majority of the calls Linux-only, but ensured that quiche-server still works.
  • [ ] Testing on remote metal

Notes

MsgFlags currently aren't supported since we don't have a use case for them, and trying to implement them was causing crate conflicts. If this is a blocker, I can add support.

Testing

Unit tests exist for basic functionality, but should probably be more robust. One per syscall would be nice. I also tested with a basic quiche-server/quiche-client setup on both Linux and MacOS.

I plan on testing on a remote metal to double-check the GSO/GRO implementation, since that apparently doesn't work on loopback.

QUIC Interop Runner results

Run took 3:48:53.496406
+----------+---------------------------------------------------+
|          |                       quiche                      |
+----------+---------------------------------------------------+
| quic-go  |        ✓(H,DC,LR,C20,M,S,R,Z,3,B,U,L2,C2,6)       |
|          |                  ?(E,A,L1,C1,V2)                  |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
|  ngtcp2  |       ✓(H,DC,LR,C20,M,S,R,Z,3,B,U,A,L2,C2,6)      |
|          |                   ?(E,L1,C1,V2)                   |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
|  mvfst   |              ✓(H,DC,LR,M,3,B,L2,C2,6)             |
|          |            ?(C20,S,R,Z,U,E,A,L1,C1,V2)            |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
|  quiche  |          ✓(H,DC,LR,M,S,R,Z,3,B,A,L2,C2,6)         |
|          |                   ?(C20,U,E,V2)                   |
|          |                      ✕(L1,C1)                     |
+----------+---------------------------------------------------+
|   kwik   |       ✓(H,DC,LR,C20,M,S,R,Z,3,B,U,A,L2,C2,6)      |
|          |                   ?(E,L1,C1,V2)                   |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
| picoquic |       ✓(H,DC,LR,C20,M,S,R,Z,3,B,U,A,L2,C2,6)      |
|          |                   ?(E,L1,C1,V2)                   |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
| aioquic  |        ✓(H,DC,LR,C20,M,S,R,Z,3,B,A,L2,C2,6)       |
|          |                  ?(U,E,L1,C1,V2)                  |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
|   neqo   |       ✓(H,DC,LR,C20,M,S,R,Z,3,B,U,A,L2,C2,6)      |
|          |                   ?(E,L1,C1,V2)                   |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
|  msquic  |          ✓(H,DC,LR,C20,M,S,R,B,U,L2,C2,6)         |
|          |                ?(Z,3,E,A,L1,C1,V2)                |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
|  chrome  |                        ✓()                        |
|          | ?(H,DC,LR,C20,M,S,R,Z,3,B,U,E,A,L1,L2,C1,C2,6,V2) |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
|  xquic   |                        ✓()                        |
|          |                        ?()                        |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
|  lsquic  |           ✓(H,DC,LR,M,S,R,3,B,A,L2,C2,6)          |
|          |               ?(C20,Z,U,E,L1,C1,V2)               |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
|  quinn   |        ✓(H,DC,LR,C20,M,S,R,3,B,U,A,L2,C2,6)       |
|          |                  ?(Z,E,L1,C1,V2)                  |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
| s2n-quic |                        ✓()                        |
|          |                        ?()                        |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
| go-x-net |              ✓(H,DC,LR,M,B,U,L2,C2,6)             |
|          |            ?(C20,S,R,Z,3,E,A,L1,C1,V2)            |
|          |                        ✕()                        |
+----------+---------------------------------------------------+
+----------+----------------------+
|          |        quiche        |
+----------+----------------------+
| quic-go  | G: 9451 (± 12) kbps  |
|          | C: 7914 (± 76) kbps  |
+----------+----------------------+
|  ngtcp2  | G: 9333 (± 14) kbps  |
|          | C: 7832 (± 106) kbps |
+----------+----------------------+
|  mvfst   | G: 9356 (± 18) kbps  |
|          | C: 7037 (± 266) kbps |
+----------+----------------------+
|  quiche  | G: 9195 (± 47) kbps  |
|          | C: 6845 (± 92) kbps  |
+----------+----------------------+
|   kwik   |  G: 9387 (± 6) kbps  |
|          | C: 7491 (± 293) kbps |
+----------+----------------------+
| picoquic | G: 9363 (± 62) kbps  |
|          | C: 7345 (± 517) kbps |
+----------+----------------------+
| aioquic  | G: 9363 (± 71) kbps  |
|          |          C           |
+----------+----------------------+
|   neqo   | G: 8414 (± 614) kbps |
|          | C: 7468 (± 182) kbps |
+----------+----------------------+
|  msquic  | G: 9443 (± 19) kbps  |
|          | C: 7507 (± 98) kbps  |
+----------+----------------------+
|  chrome  |          G           |
|          |          C           |
+----------+----------------------+
|  xquic   |                      |
+----------+----------------------+
|  lsquic  | G: 9408 (± 17) kbps  |
|          | C: 7387 (± 371) kbps |
+----------+----------------------+
|  quinn   | G: 9291 (± 109) kbps |
|          | C: 6973 (± 287) kbps |
+----------+----------------------+
| s2n-quic |                      |
+----------+----------------------+
| go-x-net | G: 9306 (± 118) kbps |
|          | C: 6157 (± 273) kbps |
+----------+----------------------+

GSO/GRO Testing

evanrittenhouse avatar Apr 24 '24 01:04 evanrittenhouse