freebsd-dev/sys/dev/cxgbe
John Baldwin 2ff447ee3b cxgbe: Enable TOE TLS RX when an RX key is provided via setsockopt().
Rather than requiring a socket to be created as a TLS socket from the
get go, switch a TOE socket from "plain" TOE to TLS mode when a
receive key is added to the socket.

The firmware is only able to switch a "plain" TOE connection to TLS
mode if the head of the pending socket data is the start of a TLS
record, so the connection is migrated to TLS mode as a multi-step
process.

When TOE TLS RX is enabled, the associated connection's receive side
is frozen via a flag in the TCB.  The state of the socket buffer is
then examined to determine if the pending data in the socket buffer
ends on a TLS record boundary.  If so, the connection is migrated to
TLS mode and unfrozen.  Otherwise, the connection is unfrozen
temporarily until more data arrives.  Once more data arrives, the
receive queue is frozen again and rechecked.  This continues until the
connection is paused at a record boundary.  Any records received
before TLS mode is enabled are decrypted as software records.

Note that this removes the 'rx_tls_ports' sysctl.  TOE TLS offload for
receive is now enabled automatically on existing TOE connections when
using a KTLS-aware SSL library just as it was previously enabled
automatically for TLS transmit.  This also enables TLS offload for TOE
connections which enable TLS after passing initial data in the clear
(e.g. STARTTLS with SMTP).

Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D37351
2022-11-15 12:08:51 -08:00
..
common cxgbe(4): Decode and display some more bits in the PL interrupt handler. 2022-08-16 01:07:36 -07:00
crypto tcp: remove INP_TIMEWAIT flag 2022-10-06 19:24:37 -07:00
cudbg cxgbe: Various whitespace fixes. 2022-11-15 12:03:57 -08:00
cxgbei tcp: remove INP_TIMEWAIT flag 2022-10-06 19:24:37 -07:00
firmware cxgbe(4): Update firmwares to 1.27.0.0. 2022-08-16 01:06:32 -07:00
iw_cxgbe cxgbe: Various whitespace fixes. 2022-11-15 12:03:57 -08:00
tom cxgbe: Enable TOE TLS RX when an RX key is provided via setsockopt(). 2022-11-15 12:08:51 -08:00
adapter.h cxgbe: Various whitespace fixes. 2022-11-15 12:03:57 -08:00
if_cc.c
if_ccv.c
if_cxl.c
if_cxlv.c
offload.h cxgbe: Enable TOE TLS RX when an RX key is provided via setsockopt(). 2022-11-15 12:08:51 -08:00
osdep.h cxgbe(4): make the logging helpers a little more robust. 2021-04-22 15:28:43 -07:00
t4_clip.c cxgbe(4): Empty the clib_db before trying to destroy it. 2021-06-04 12:01:14 -07:00
t4_clip.h cxgbe(4): Overhaul CLIP (Compressed Local IPv6) table management. 2021-05-23 16:07:29 -07:00
t4_filter.c cxgbe(4): Add support for NIC suspend/resume and live reset. 2021-04-27 22:48:51 -07:00
t4_if.m
t4_ioctl.h cxgbe/t4_tom: Support for round-robin selection of offload queues. 2022-04-14 15:49:58 -07:00
t4_iov.c cxgbe: Remove unused devclass arguments to *DRIVER_MODULE(). 2022-04-19 10:44:08 -07:00
t4_l2t.c
t4_l2t.h
t4_main.c cxgbe: Enable TOE TLS RX when an RX key is provided via setsockopt(). 2022-11-15 12:08:51 -08:00
t4_mp_ring.c
t4_mp_ring.h
t4_netmap.c cxgbe: Various whitespace fixes. 2022-11-15 12:03:57 -08:00
t4_sched.c Add a switch structure for send tags. 2021-09-14 11:43:41 -07:00
t4_sge.c cxgbe: Various whitespace fixes. 2022-11-15 12:03:57 -08:00
t4_smt.c
t4_smt.h
t4_tracer.c Adjust t4_tracer_mod{load,unload}() definitions to avoid clang 15 warnings 2022-07-19 20:37:02 +02:00
t4_vf.c cxgbe: Remove unused devclass arguments to *DRIVER_MODULE(). 2022-04-19 10:44:08 -07:00