linux/net/tls
Shahar Shitrit c15d5c62ab net: tls: Cancel RX async resync request on rcd_delta overflow
When a netdev issues a RX async resync request for a TLS connection,
the TLS module handles it by logging record headers and attempting to
match them to the tcp_sn provided by the device. If a match is found,
the TLS module approves the tcp_sn for resynchronization.

While waiting for a device response, the TLS module also increments
rcd_delta each time a new TLS record is received, tracking the distance
from the original resync request.

However, if the device response is delayed or fails (e.g due to
unstable connection and device getting out of tracking, hardware
errors, resource exhaustion etc.), the TLS module keeps logging and
incrementing, which can lead to a WARN() when rcd_delta exceeds the
threshold.

To address this, introduce tls_offload_rx_resync_async_request_cancel()
to explicitly cancel resync requests when a device response failure is
detected. Call this helper also as a final safeguard when rcd_delta
crosses its threshold, as reaching this point implies that earlier
cancellation did not occur.

Signed-off-by: Shahar Shitrit <shshitrit@nvidia.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1761508983-937977-3-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-10-29 18:32:18 -07:00
..
Kconfig
Makefile
tls.h tls: Avoid -Wflex-array-member-not-at-end warning 2025-09-24 16:23:02 -07:00
tls_device.c net: tls: Cancel RX async resync request on rcd_delta overflow 2025-10-29 18:32:18 -07:00
tls_device_fallback.c net/tls: use the new scatterwalk functions 2025-03-02 15:19:44 +08:00
tls_main.c tls: always set record_type in tls_process_cmsg 2025-10-15 17:41:45 -07:00
tls_proc.c tls: snmp: do not use SNMP_MIB_SENTINEL anymore 2025-09-08 18:06:21 -07:00
tls_strp.c tls: make sure to abort the stream if headers are bogus 2025-09-18 12:43:54 +02:00
tls_sw.c tls: don't rely on tx_work during send() 2025-10-15 17:41:45 -07:00
tls_toe.c
trace.c
trace.h