]> git.baikalelectronics.ru Git - kernel.git/commit
net/tls: Add asynchronous resync
authorBoris Pismenny <borisp@mellanox.com>
Mon, 8 Jun 2020 16:11:38 +0000 (19:11 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Sat, 27 Jun 2020 21:00:22 +0000 (14:00 -0700)
commit9e2c929d854f9b63f4bfec0be9ffd26d8b3fc3e3
tree1be4346f2fa97ef9adbb6c9ed2feaf670a8a08d5
parentb4b87898e129a01c8d301242a5246bcb70bedf17
net/tls: Add asynchronous resync

This patch adds support for asynchronous resynchronization in tls_device.
Async resync follows two distinct stages:

1. The NIC driver indicates that it would like to resync on some TLS
record within the received packet (P), but the driver does not
know (yet) which of the TLS records within the packet.
At this stage, the NIC driver will query the device to find the exact
TCP sequence for resync (tcpsn), however, the driver does not wait
for the device to provide the response.

2. Eventually, the device responds, and the driver provides the tcpsn
within the resync packet to KTLS. Now, KTLS can check the tcpsn against
any processed TLS records within packet P, and also against any record
that is processed in the future within packet P.

The asynchronous resync path simplifies the device driver, as it can
save bits on the packet completion (32-bit TCP sequence), and pass this
information on an asynchronous command instead.

Signed-off-by: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
include/net/tls.h
net/tls/tls_device.c