aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/zstd/lib/deprecated
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2022-04-23 08:11:18 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2022-06-07 10:58:09 +0000
commitfe8c78f0d20285cacb0695aa96a4ae302429429a (patch)
tree3797c61a7c330a64975b94fb6b472c377f9433e2 /sys/contrib/zstd/lib/deprecated
parentf0fca64618045bba23f4d61a377b64f9acb96220 (diff)
ktls: Add full support for TLS RX offloading via network interface.
Basic TLS RX offloading uses the "csum_flags" field in the mbuf packet header to figure out if an incoming mbuf has been fully offloaded or not. This information follows the packet stream via the LRO engine, IP stack and finally to the TCP stack. The TCP stack preserves the mbuf packet header also when re-assembling packets after packet loss. When the mbuf goes into the socket buffer the packet header is demoted and the offload information is transferred to "m_flags" . Later on a worker thread will analyze the mbuf flags and decide if the mbufs making up a TLS record indicate a fully-, partially- or not decrypted TLS record. Based on these three cases the worker thread will either pass the packet on as-is or recrypt the decrypted bits, if any, or decrypt the packet as usual. During packet loss the kernel TLS code will call back into the network driver using the send tag, informing about the TCP starting sequence number of every TLS record that is not fully decrypted by the network interface. The network interface then stores this information in a compressed table and starts asking the hardware if it has found a valid TLS header in the TCP data payload. If the hardware has found a valid TLS header and the referred TLS header is at a valid TCP sequence number according to the TCP sequence numbers provided by the kernel TLS code, the network driver then informs the hardware that it can resume decryption. Care has been taken to not merge encrypted and decrypted mbuf chains, in the LRO engine and when appending mbufs to the socket buffer. The mbuf's leaf network interface pointer is used to figure out from which network interface the offloading rule should be allocated. Also this pointer is used to track route changes. Currently mbuf send tags are used in both transmit and receive direction, due to convenience, but may get a new name in the future to better reflect their usage. Reviewed by: jhb@ and gallatin@ Differential revision: https://reviews.freebsd.org/D32356 Sponsored by: NVIDIA Networking
Diffstat (limited to 'sys/contrib/zstd/lib/deprecated')
0 files changed, 0 insertions, 0 deletions