]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Clear TLS offload mode if a TLS socket hangs without receiving data.
authorJohn Baldwin <jhb@FreeBSD.org>
Thu, 3 Dec 2020 22:06:08 +0000 (22:06 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 3 Dec 2020 22:06:08 +0000 (22:06 +0000)
commit0082e479efce116e9fa46bf044c27904f40eda4f
tree77d83a38caa9e139d23f17768f80c35b51c2e315
parent180c2dca4e6b41c4b75d95125cd0ae499953efef
Clear TLS offload mode if a TLS socket hangs without receiving data.

By default, if a TOE TLS socket stops receiving data for more than 5
seconds, revert the connection back to plain TOE mode.  This provides
a fallback if the userland SSL library does not support KTLS.  In
addition, for client TLS 1.3 sockets using connect(), the TOE socket
blocks before the handshake has completed since the socket option is
only invoked for the final handshake.

The timeout defaults to 5 seconds, but can be changed at boot via the
hw.cxgbe.toe.tls_rx_timeout tunable or for an individual interface via
the dev.<nexus>.toe.tls_rx_timeout sysctl.

Reviewed by: np
MFC after: 2 weeks
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D27470
sys/dev/cxgbe/offload.h
sys/dev/cxgbe/t4_main.c
sys/dev/cxgbe/tom/t4_connect.c
sys/dev/cxgbe/tom/t4_cpl_io.c
sys/dev/cxgbe/tom/t4_tls.c
sys/dev/cxgbe/tom/t4_tom.c
sys/dev/cxgbe/tom/t4_tom.h