Skip to content

net: support QUIC crypto

Adel Abouchaev linux-doc linux-kselftest linux-security-module netdev 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 1 replyIn review
  2. v36 patches 2 repliesSuperseded
  3. v2 posting 2/26 patches 9 repliesApplied
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 RFC posting 1/26 patches2 repliesSuperseded
v1 RFC6 patches8 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6net: Documentation on QUIC kernel Tx crypto.Documentation/networking/index.rst Documentation/networking/quic.rst+216 -01 reply
2/6net: Define QUIC specific constants, control and data plane structuresinclude/uapi/linux/quic.h include/uapi/linux/udp.h+71 -00 replies
3/6net: Add UDP ULP operations, initialization and handling prototype functions.include/net/inet_sock.h include/net/udp.h include/uapi/linux/udp.h +4 more+237 -10 replies
4/6net: Implement QUIC offload functionsinclude/net/quic.h net/Kconfig net/ipv4/udp.c +4 more+1575 -00 replies
5/6net: Add flow counters and Tx processing error counterinclude/net/netns/mib.h include/net/quic.h include/net/snmp.h +4 more+120 -10 replies
6/6net: Add self tests for ULP operations, flow setup and crypto teststools/testing/selftests/net/.gitignore tools/testing/selftests/net/Makefile tools/testing/selftests/net/quic.c +1 more+1418 -10 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchBagas Sanjaya
1/6R-b
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [net-next v4 0/6] net: support QUIC crypto

QUIC requires end to end encryption of the data. The application usually prepares the data in clear text, encrypts and calls send() which implies multiple copies of the data before the packets hit the networking stack. Similar to kTLS, QUIC kernel offload of cryptography reduces the memory pressure by reducing the number of copies.

The scope of kernel support is limited to the symmetric cryptography, leaving the handshake to the user space library. For QUIC in particular, the application packets that require symmetric cryptography are the 1RTT packets with short headers. Kernel will encrypt the application packets on transmission and decrypt on receive. This series implements Tx only, because in QUIC server applications Tx outweighs Rx by orders of magnitude.

Supporting the combination of QUIC and GSO requires the application to correctly place the data and the kernel to correctly slice it. The encryption process appends an arbitrary number of bytes (tag) to the end of the message to authenticate it. The GSO value should include this overhead, the offload would then subtract the tag size to parse the input on Tx before chunking and encrypting it.

With the kernel cryptography, the buffer copy operation is conjoined with the encryption operation. The memory bandwidth is reduced by 5-8%. When devices supporting QUIC encryption in hardware come to the market, we will be able to free further 7% of CPU utilization which is used today for crypto operations.

Adel Abouchaev (6):
Documentation on QUIC kernel Tx crypto.
Define QUIC specific constants, control and data plane structures Add UDP ULP operations, initialization and handling prototype
functions.
Implement QUIC offload functions
Add flow counters and Tx processing error counter
Add self tests for ULP operations, flow setup and crypto tests

 Documentation/networking/index.rst     |    1 +
 Documentation/networking/quic.rst      |  215 ++++
 include/net/inet_sock.h                |    2 +
 include/net/netns/mib.h                |    3 +
 include/net/quic.h                     |   63 +
 include/net/snmp.h                     |    6 +
 include/net/udp.h                      |   33 +
 include/uapi/linux/quic.h              |   68 ++
 include/uapi/linux/snmp.h              |    9 +
 include/uapi/linux/udp.h               |    4 +
 net/Kconfig                            |    1 +
 net/Makefile                           |    1 +
 net/ipv4/Makefile                      |    3 +-
 net/ipv4/udp.c                         |   15 +
 net/ipv4/udp_ulp.c                     |  192 +++
 net/quic/Kconfig                       |   16 +
 net/quic/Makefile                      |    8 +
 net/quic/quic_main.c                   | 1533 ++++++++++++++++++++++++
 net/quic/quic_proc.c                   |   45 +
 security/security.c                    |    1 +
 tools/testing/selftests/net/.gitignore |    1 +
 tools/testing/selftests/net/Makefile   |    3 +-
 tools/testing/selftests/net/quic.c     | 1369 +++++++++++++++++++++
 tools/testing/selftests/net/quic.sh    |   46 +
 24 files changed, 3636 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/networking/quic.rst
 create mode 100644 include/net/quic.h
 create mode 100644 include/uapi/linux/quic.h
 create mode 100644 net/ipv4/udp_ulp.c
 create mode 100644 net/quic/Kconfig
 create mode 100644 net/quic/Makefile
 create mode 100644 net/quic/quic_main.c
 create mode 100644 net/quic/quic_proc.c
 create mode 100644 tools/testing/selftests/net/quic.c
 create mode 100755 tools/testing/selftests/net/quic.sh
Signature · 1 line
2.30.2